in reply to timeout in IO::Socket::INET
To the best of my memory the timout code in IO::Socket::INET only ever dealt with the time taken to get the socket connection.
You have two basic* methods to limit the time spent waiting for real data on a socket. You can use 4 arg select to wait X seconds for a handle to have data on it for reading or you can use alarm(). Alarm is easier but is effectively unsafe (due to unsafe signals). select is the best solution. There is a tutorial on Using select and IO::Select.
* you can also make a socket(s) non blocking and check for data in a loop.
cheers
tachyon
|
|---|