From: Gabriel Paues Date: 2002-06-18T19:09:26+09:00 Subject: Re: TCPSocket - ECONNREFUSED Thanks! Now it works! I had the 'localhost' line in the TCPServer as you thought... /gabriel ts wrote: > > >>>>> "G" == Gabriel Paues writes: > > G> Plz, help me! Is this a bug? > > No, how do you use TCPServer::open ? > > For example with this line : > > pigeon% grep open b.rb > gs = TCPserver.open('localhost', 4314) > pigeon% > > pigeon% ruby -rsocket -e 'TCPSocket.open("localhost", 4314)' > # is accepted > # is gone > pigeon% > > pigeon% ruby -rsocket -e 'TCPSocket.open("138.102.114.46", 4314)' > -e:1:in `open': Connection refused - "connect(2)" (Errno::ECONNREFUSED) > from -e:1 > pigeon% > > Now if I change it to > > pigeon% grep open b.rb > gs = TCPserver.open(4314) > pigeon% > > pigeon% ruby -rsocket -e 'TCPSocket.open("localhost", 4314)' > # is accepted > # is gone > pigeon% > > pigeon% ruby -rsocket -e 'TCPSocket.open("138.102.114.46", 4314)' > # is accepted > # is gone > pigeon% > > Guy Decoux