in reply to Servers on IO::Socket or just Socket?

The problem is, I can't connect from out side to the port 2345!

That's because you gave 'localhost' as your LocalAddr parameter. Try using the machine's hostname or the IP of the interface you want to use instead.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: Servers on IO::Socket or just Socket?

Replies are listed 'Best First'.
Re: Re: Servers on IO::Socket or just Socket?
by Anonymous Monk on Oct 23, 2002 at 03:42 UTC
    Even better, don't use the LocalAddr option unless you need it. By default, IO::Socket::INET binds to all addresses on the machine. Then, you don't need to determine or hardcode the hostname or IP address and it will work on machines with multiple IP addresses. BTW, on both Windows and Unix, you can use the 'netstat' command to list the active outgoing and incoming sockets. Very useful to check if your program is listening on the port and address you expect.
Re: Re: Servers on IO::Socket or just Socket?
by gmpassos (Priest) on Oct 23, 2002 at 03:13 UTC
    It works! Thanks! But in the pod this isn't documented very well. Some comment can be made...

    Graciliano M. P.
    "The creativity is the expression of the liberty".