From: Nate Smith Date: 2006-03-10T15:28:30+09:00 Subject: Re: Control-c hangs TCPSocket write --Apple-Mail-1-466960952 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Sorry, the code should look like: server = TCPServer.new( '127.0.0.1', 31337 ) socket = server.accept data = socket.gets # added this line # now client (via telnet), sends control-c socket.print "test" # <-- produces no output on client On Mar 9, 2006, at 10:10 PM, Nate Smith wrote: > Hello, > > I created a server, accepted a connection via telnet, and if the > client sends a control-c, the TCPSocket hangs. It can still read > data, but writing to it produces no output on the client side. > Here's the code: > > server = TCPServer.new( '127.0.0.1', 31337 ) > socket = server.accept > > # now client (via telnet), sends control-c > > socket.print "test" # <-- produces no output on client > > Anyone know what's up? I checked for exception throws and there are > none, and the server side keeps running normally, besides this. > > Nate > --Apple-Mail-1-466960952--