From: Nikolay Elkov Date: 2002-04-03T16:51:19+09:00 Subject: TCPSocket::new in ruby 1.7 When I execute the following irb(main):003:0> s = TCPSocket::new('somehost' , 23, 'myhost', 45678) # irb(main):004:0> I get this: TCP myhost:45678 myhost:0 LISTENING TCP myhost:45678 somehost:telnet ESTABLISHED After I close the socket, they are both gone. However, the following irb(main):006:0> begin irb(main):007:1* timeout (5) do irb(main):008:2* s = TCPSocket::new('somehost' , 233, 'myhost', 45678) irb(main):009:2> end irb(main):010:1> rescue TimeoutError irb(main):011:1> puts "timeout" irb(main):012:1> end timeout nil irb(main):013:0> produces TCP httpsvr1:45678 myhost:0 LISTENING There is no, at lead I can't think of any, a way to close the LISTENING socket. Is it supposed to work like this and if so, how do I close the socket?