|Syntactic Confectionery Delight|
Timeout for an established connectionby 0day (Sexton)
|on Dec 30, 2012 at 14:24 UTC||Need Help??|
0day has asked for the
wisdom of the Perl Monks concerning the following question:
Tell me please how i can set the timeout for an established connection, which I can not get the data for a long time?
I handle a lot of sockets with a "poll" in loop:
But these connections cannot be processed in this cycle. I did this:
setsockopt($sock, SOL_SOCKET, SO_RCVTIMEO, pack("QQ", 10, 0))
and waited for the error on the socket.
But this does not occur and the connection remains frozen.