SHiBuMi
3/19/2007 11:11:00 PM
Yes, it's most probably a network security issue. Check your firewall
settings, and in order to be sure, disable your firewall and try while
firewall is disabled.
On 19 Mart, 23:15, sean nakasone <seannakas...@yahoo.com> wrote:
> Here's my very simple script to open a tcp port and write to it.
>
> require 'socket'
> s=TCPSocket.new("173.30.6.16", 9990)
> s.write("Hello\n")
> s.close
>
> The TCPSocket.new returns with:
>
> cli.rb:3:in `initialize': Bad file descriptor - connect(2) (Errno::EBADF)
> from cli.rb:3:in `new'
> from cli.rb:3
>
> The IP address is the PC that I'm running the script from. I'm stumped
> because if I replace "173.30.6.16" with "localhost" or "127.0.0.1", it
> works. Any suggestions? I guess it could be a network security issue,
> but how can I get around this?