Comment from Net::Wire10 source code:
# If select() said data is available, but it # was not, it means the connection was lost.
I interpret this to be that IO::Select on a blocking socket will falsely return "data available" if the OS TCP socket is in one of the disconnected states.
Another comment:
# IO::Select sometimes returns undef # instead of an empty array.
So beware of that..
And a third one about alarm() and can_read():
Alarms are silently cancelled after IO::Select->can_read() is called.
Of course, $SIG{ALRM} and signals in general is usually busted in many other ways, so you probably avoid a lot of trouble by steering clear of signals completely, making this less of an issue. Net::Wire10 uses threads::shared and a shared instance variable for signaling.
In reply to Re^4: Timeouts: Any alternative to alarm in Win32?
by Anonymous Monk
in thread Timeouts: Any alternative to alarm in Win32?
by jbbarnes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |