added eof() to sockets