From: Ryan Leavengood Date: 2005-07-01T06:23:37+09:00 Subject: Re: stupid TCP Joe Van Dyk said: > > Aha. I'm guessing it has something to do with not sending the data > immediately. If I do > > tcp_client.close > > Then the data gets sent. But I don't want to close the socket. And > I'm not seeing anything (yet) that would let me immediately send (I > tried IO#flush) the data over the socket. From what I've seen the problem is on the reading end, not the writing end. Try just doing puts "we recieved: <#{session.read(5)}>" instead of using gets. You will see "Hello", even without using a newline (or calling puts), or closing the client socket. In my experience most TCP problems I've had have been on the reading side. Ryan