ccn has asked for the wisdom of the Perl Monks concerning the following question:
The "Listen" parameter tells a size of a connections queue.use IO::Socket; $server = IO::Socket::INET->new(LocalPort => $server_port, Type => SOCK_STREAM, Reuse => 1, Listen => 10 ) # or SOMAXCONN or die "Couldn't be a tcp server on port $server_port : $@\n"; while ($client = $server->accept()) { # $client is the new connection } close($server);
I'd like to know how many pending connecions I have at any time.
Is it possible to trace a listen queue of a socket?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: How to trace a listen queue of a socket?
by merlyn (Sage) on Apr 21, 2004 at 20:11 UTC |