in reply to Re: Re: Re: Re: Re: IO::Socket
in thread IO::Socket

Okay. This is the code I am using to create the client socket. I have tried the PeerAddr with both a 4 byte IP number, and the domain name and nothing has worked. It dies with the IP, and it hangs with the domain.
$sock = new IO::Socket::INET( PeerAddr => 'dev01.nerds.com', PeerPort => 1200, Proto => 'tcp', Type => SOCK_STREAM );
What am I doing wrong? I am at a total loss. - kel -

Replies are listed 'Best First'.
(tye)Re: IO::Socket
by tye (Sage) on Feb 08, 2001 at 00:35 UTC

    Well, if you still have LocalAddr=>'localhost', then the above won't connect because the server won't be listening at the address you are trying to connect via.

    As kschwab pointed out, using LocalAddr in a server is almost always a mistake (and it is a very common mistake).

            - tye (but my friends call me "Tye")
      No. I took LocalAddr out of the server script. That way it should listen at every possible place right? - kel -
Re: Re: Re: Re: Re: Re: Re: IO::Socket
by chipmunk (Parson) on Feb 08, 2001 at 00:37 UTC
    Try connecting to the server program with telnet from the machine where you're running the client program. % telnet dev01.nerds.com 1200 If that doesn't work, then the problem probably isn't in your client program.
      That box uses SSH1. Is that why I am having all these problems? If you say yes I am going to blow something up. :) - kel -