renamed socket I/O funcs