On Mon, 16 Apr 2007 11:04:09 +0800
"Jeff Pang" <[EMAIL PROTECTED]> wrote:


> I wrote a simple socket server which get the listen socket like below,
> 
> my $socket = IO::Socket::INET->new(
>                                            LocalAddr => xxx.xxx.xxx.xxx,
>                                            LocalPort => 1111,
>                                            Listen    => SOMAXCONN,
>                                            Proto     => 'tcp',
>                                            Reuse     => 1,
>                                            Timeout   => 30,
>                                          );
> 
> This socket server was binding on port 1111 and prepare to accept the
> connections from clients,with 30 seconds timeout.
> Then I telnet to this socket server from another host,
> 
> $ telnet xxx.xxx.xxx.xxx 1111
> 
> After telneted in,I didn't do anything,just waited for the server to
> exit due to the timeout.But even I wait for many minutes,the socket
> server seems didn't drop me and I'm still kept the telnet connection.
> 
> Why the timeout seems not useful?Maybe I'm wrong for this concept?Thanks.


AFAIK, the time out refers to the creation of the socket, so if 
        my $socket = IO::Socket::INET->new(

   Didn't come into existence within 20 seconds, the process would die



Owen

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to