http://www.perlmonks.org?node_id=954224


in reply to Re: Locked threads and tcp timeouts
in thread Locked threads and tcp timeouts

See how to set socket recv timeout in architecture independent manner? for how to set the recieve timeout.
I have read this thread but it didn't do any good for me. Suggested line:
setsockopt( $client, SOL_SOCKET, SO_RCVTIMEO, pack('L!L!', +10, 0) );
didn't help, perl still blocks at reading from socket. Maybe the 64-bit env is the reason?
You could also resort to non-blocking IO. See How to set sockets non-blocking on Windows
Thanks, i'll look into it.