Subject: | EOF conspicuously absent from IO::Socket::SSL::SSL_HANDLE |
I tried to come up with a few things on my own. It seems like this
aught to work, but it causes an infinite loop instead.
sub EOF { ${shift()}->eof(@_) }
I suspect there simply isn't a meaningful way to provide EOF. The
following solution is just fine...
if( $fh = $io_select->can_read(1) ) {
if( $fh->getline ) {
# blah
} else {
die "socket is apparently closed."
}
}
I do wish there were a way to detect that the socket was closed on the
remote end before trying to read from the socket. It seems like that's
something the kernel would tell the socket about.
I wish you could do this:
if( $sock->eof() ) {
die "socket is apparently closed."
}
return $sock->getline;
--
If riding in an airplane is flying, then riding in a boat is swimming.
107 jumps, 43.5 minutes of freefall, 83.4 freefall miles.