From: "Hal E. Fulton" Date: 2001-09-20T01:38:47+09:00 Subject: [ruby-talk:21399] Re: How to tell if port is in use... ----- Original Message ----- From: ts To: ruby-talk ML Cc: Sent: Wednesday, September 19, 2001 8:59 AM Subject: [ruby-talk:21390] Re: How to tell if port is in use... > >>>>> "H" == Hal E Fulton writes: > > H> As far as I can see, starting up two TCPServers > H> on the same port on the same machine > H> doesn't give an exception... > > Can you give an example ? > > pigeon% ruby -rsocket -e 'p TCPServer.new("localhost", 3333);TCPServer.new("localhost", 3333)' > # > -e:1:in `new': Address already in use - "bind(2)" (Errno::EADDRINUSE) > from -e:1 > pigeon% Maybe it's a Windows issue. Not sure how the networking stuff differs... I think NT is more Unix-like, but I'm using 98 (and 1.6.3 cygwin). In that environment, this one-liner does not give me an error. Hal