in reply to Re: Re: Problem with SO_REUSEPORT in IO::Socket::INET
in thread Problem with SO_REUSEPORT in IO::Socket::INET

Alright. From the code that you showed us, I see that you are trying to open multiple sockets listening on the same port. You can't do that even if you specify SO_REUSEPORT. Here is why
... For IP only one socket may be bound to a specific local address/port pair. For TCP a bound local socket endpoint (address/port pair) is unavailable for some time after closing the socket, unless the SO_REUSEADDR flag is set. Note that carelessly setting SO_REUSEADDR might make TCP more unreliable unless PAWS is used (see tcp(4)); the delay is needed to handle old pack- ets still in the network. ...
He does not use IO::Socket, you are correct; however, he does show you how to implement a pre-forking server.
That is what I was referring to when I posted that link.

--perlplexer

Replies are listed 'Best First'.
Re: Re: Re: Re: Problem with SO_REUSEPORT in IO::Socket::INET
by Aighearach (Initiate) on Apr 14, 2002 at 04:15 UTC
    Thank you. :)

    Yes, I am trying to implement a preforking server, but what Randal does in the article is use a webserver library that uses.

    I would rather to not code it that way, and to use a single listen object, than to get away from using IO::Socket::INET for it. (because it needs to be accessible)
    --
    Snazzy tagline here