->can_read(0) will only return handles that have been set into the IO::Select object.
Only set those you are interested in.
BTW, from the fragment you gave, $sock is your listen socket and is only used for accepts.
$client_sock is your read/write socket.
typical code fragment:
for my $handle ( $sel->can_read(0) ) { if( $handle == $sock ) { # do accepts here... } elsif( $handle == $client_sock ) { # do sysreads here... } }
In reply to Re^5: Using read/syswrite with IO::Socket::SSL
by tybalt89
in thread Using read/syswrite with IO::Socket::SSL
by Bloehdian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |