Thanks,

I will try this out.  I hope it works in a multithreaded environment...

-Dan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of StoneBeat
Sent: Tuesday, May 02, 2006 9:07 PM
To: [email protected]
Subject: Re: IO::Socket and Setting Timeout

try perldoc -f alarm

El Lunes, 1 de Mayo de 2006 21:05, Daniel Rychlik escribió:
> Guys,
>
> How would you set a timeout on a TCP connection?
>
> I have been playing with the idea of using IO::Socket to execute
> commands on remote machines.
>
> On the listening side of the connection, I respond back to the client
> with an "OKAY" for the client to send its remote command to the
> server...  But this brought up the question, what if I never get a
> response back through the TCP connection?
>
> I saw this in the client constructor but Im not able to get it to
> work....
>
> my $socket = IO::Socket::INET->new(PeerAddr     => $remote_host,
>                                 PeerPort        => $remote_port,
>                                 Proto           => "tcp",
>                                 Type            => SOCK_STREAM,
>                                 TimeOut         => 10)
>
>
> If the timeout limit is reached, with the client terminate?
>
> Is the value of TimeOut in the constructor stating "TimeOut is 10
> seconds?"
>
> -Dan
>
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to