Aighearach has asked for the wisdom of the Perl Monks concerning the following question:
Hey, I'm trying to pre-open multiple sockets listening on the same address. (think apache in Perl...)
Problem is, when I set ReusePort => 1 I get Your vendor has not defined Socket macro SO_REUSEPORT, used at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160
Any clue what I can do for a workaround from here?
Perl version is 5.6.1 on i386 Linux
Code snippet is:
use strict; use warnings; use IO::Socket; my $sock = new IO::Socket::INET( Listen => SOMAXCONN, LocalPort => 5000, LocalAddr => 'localhost', Proto => 'tcp', ReuseAddr => 1, ReusePort => 1, ) or die "failed opening socket: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with SO_REUSEPORT in IO::Socket::INET
by dws (Chancellor) on Apr 13, 2002 at 19:04 UTC | |
|
Re: Problem with SO_REUSEPORT in IO::Socket::INET
by perlplexer (Hermit) on Apr 13, 2002 at 19:11 UTC | |
by Aighearach (Initiate) on Apr 13, 2002 at 19:14 UTC | |
by perlplexer (Hermit) on Apr 13, 2002 at 19:49 UTC | |
by Aighearach (Initiate) on Apr 14, 2002 at 04:15 UTC | |
|
Re: Problem with SO_REUSEPORT in IO::Socket::INET
by Necos (Friar) on Apr 14, 2002 at 00:58 UTC | |
by Aighearach (Initiate) on Apr 14, 2002 at 04:11 UTC |