in reply to Re: Servers on IO::Socket or just Socket?
in thread Servers on IO::Socket or just Socket?
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.