Thanks for the quick reply.

> readlines read everything until the end of file.  In this case, client

So, even if I do manually use the sockets's send method to send an EOF
character (C-D or C-Z), the server will just wait forever?  Is the meaning
of end of file different for a socket?

> side does not close the socket, so that server side waits forever.
> Use read, gets or readline.
> matz.

>sock = TCPSocket.new(...)
>sock.send("blah\nblah\n\C-D")
>
>Then, on the server side I have
>
>server = TCPServer.new(...)
>sock = server.accept
>recv_msg = sock.readlines
>print recv_msg