Posted on 2009-01-07 07:21:44-08 by noxxi in response to 9664
Re: Need help in designing a ssl perl client connecting to ssl ...
from IO::Socket::SSL you can use the normal IO::Handle methods, like read, getline, sysread, syswrite, print... . These methods use SSL_read, SSL_write from the Net::SSLeay layer below IO::Socket::SSL.
As for sysread - it will only return what it cannot return more than it gets from the kernel in a single read and it will probably also not return more than fits in a buffer from the SSL layer. That's the usual semantic of sysread - it will only return *up to* the limit.
If you want it to read N bytes (and maybe block while waiting for all the bytes) you have to use read, that is the same behavior with all IO::Handle (like read(2) and fread(3) in C)
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.