Bennett Haselton wrote:

> p.s. is there a way to ensure that the IO::Socket::INET accept() call will 
> fail if the port is already in use?  If I try
> 
> my $server = IO::Socket::INET->new(
>                                  Proto     => 'tcp',
>                                  LocalPort => 80,
>                                  Listen    => SOMAXCONN,
>                                  Reuse     => 1,
>                                  Timeout   => 10
>                                  );
> $server->accept();
> 
> with a Web server already running on my machine and listening on port 80, 
> the code above runs with no error -- it times out after 10 seconds since it 
> can't receive any connections, because the OS is sending all port 80 
> connections to the Web server.  Is there a configuration option I can pass 
> such that accept() will always fail right away because port 80 is in use?

Try dropping the reuse arg.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to