in reply to IO::Socket::INET Dangling Connections
use IO::Select; use constant TIMEOUT => 10; ... ... my $select = IO::Select->new(); $select->add($con); # from your example above. # Don't need to save the array returned, there's only one handle. if($select->can_read(TIMEOUT)) { # $con has pending data. } else { # timeout. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: IO::Socket::INET Dangling Connections
by Anonymous Monk on Feb 21, 2001 at 02:07 UTC |