in reply to Re: Re: IO::Socket
in thread IO::Socket
All machines with an IP stack usually have at least two IP addresses associated with it: The normal IP address that you use to make connections to the machine from other hosts, and a loopback address 127.0.0.1, which by definition refers to the "local host". The LocalAddr option does not mean "listen for connections coming from clients on the given host", it means "listen for connections from clients connecting *to* the given host, which is this machine". It will fail if the hostname or IP address you give it is not a valid IP address for the host the server is running on.
So generally, omit the LocalAddr option unless you have an explicit need to only listen on a single interface, ignoring connection attempts being made to other interfaces on the same host. Omitting it is the same as using a LocalAddr of 0.0.0.0, or a wildcard IP, meaning it'll accept connections on all local interfaces, which is usually what you want.
Does this make sense? I'd also check out the documentation for bind, as this is how LocalAddr is implemented. That might give you some more detail.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: IO::Socket
by dsb (Chaplain) on Feb 07, 2001 at 23:57 UTC | |
by Fastolfe (Vicar) on Feb 08, 2001 at 00:01 UTC | |
by dsb (Chaplain) on Feb 08, 2001 at 00:24 UTC | |
by tye (Sage) on Feb 08, 2001 at 00:35 UTC | |
by dsb (Chaplain) on Feb 08, 2001 at 00:36 UTC | |
by chipmunk (Parson) on Feb 08, 2001 at 00:37 UTC | |
by dsb (Chaplain) on Feb 08, 2001 at 00:40 UTC |