ev and sock functions.