From: Joel VanderWerf Date: 2010-06-03T11:35:07+09:00 Subject: Re: TCPSocket error Brian Candler wrote: > Ted Pon wrote: >> irb(main):002:0> require 'socket' >> => true >> irb(main):005:0> TCPSocket.open('0.0.0.0', 8888) >> Errno::EADDRNOTAVAIL: The requested address is not valid in its context. > > Like it says, 0.0.0.0 is not a valid destination IP address. Try > instead: > > TCPSocket.open('127.0.0.1', 8888) Dunno why, but ruby on linux seems to let me connect to 0.0.0.0. A socket bound to 127.0.0.1 does seem to accept this connection.