There's really nothing to explain. It does exactly what you asked for by calling select RBITS,WBITS,EBITS,TIMEOUT.
Note that IO::Select is easier to use than select.
use IO::Select (); my $sel = IO::Select->new($MySocket); my @read = $sel->can_read(3) or die("Time out!\n"); $MySocket->recv($text);
In reply to Re^3: How time out can be done here?
by ikegami
in thread How time out can be done here?
by sanjay nayak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |