From: Edward Faulkner Date: 2005-09-28T06:20:32+09:00 Subject: Re: Socket Problems... --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 28, 2005 at 06:16:43AM +0900, jtxx000 wrote: > I'm having some trouble getting ruby sockets working... I have two > scripts: one for the client and one for the server. If I run the two > scripts on the same computer with them both set to connect to localhost > then it works fine, but if I run the scripts on different computers in > the same LAN with the server set to connect to localhost and the client > set to connect to the IP address of the server then I get "No > connection could be made because the target machine actively refused > it. - connect(2) (Errno::ECONNREFUSED)" Any ideas? If you set the server to listen on localhost it will only listen on the loopback device. Don't set a listen address and it will listen to everything: TCPServer.new('',portnum) --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDObdVnhUz11p9MSARAlIHAJ4iOrccW8nwJE1mgHpUH/Hq4zhMEgCg3Y/f 2uELPBSbLcqjlPKlnebrhQA= =M7G/ -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--