Bodger has asked for the wisdom of the Perl Monks concerning the following question:
This is a general question since the underlying code is large and complex.
I have a socket client IO::Socket::SSL using blocking sockets.
I create IO::Select and add above socket.
I sysread and syswrite from the socket fine. Then I get the following scenario and I do not know what it is about.
IO::Select::can_read returns my socket indicating there is data to read.
IO::Socket::SSL->pending returns zero meaning there is no data available.
I do a IO::Socket::SSL::sysread on it and it returns zero.
perlfunc sysread says a zero return is end of file, does this mean my socket has disconnected? I keep calling can_read and it keeps repeating. I even create a new IO::Select and can_read still says data is available.
IO::Socket::SSL::connected returns the network address it is suppose to return undef if not connected.
Does anyone know what this means?
Thanx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IO::Socket::SSL and IO::Select
by Corion (Patriarch) on Mar 11, 2015 at 08:15 UTC | |
by Bodger (Acolyte) on Mar 11, 2015 at 16:55 UTC | |
|
Re: IO::Socket::SSL and IO::Select
by noxxi (Pilgrim) on Mar 11, 2015 at 17:54 UTC | |
by Bodger (Acolyte) on Mar 11, 2015 at 23:59 UTC | |
by noxxi (Pilgrim) on Mar 12, 2015 at 14:40 UTC |