Hi,

   I've noticed that SSL_read() will either read from the socket, or
return buffered data, but never both. That is, if there are (eg) 1000
bytes of data waiting to be read, and I call SSL_read() asking for
1500 bytes, it will return only the 1000 buffered bytes, rather than
reading from the socket to supply the other 500.

   This means that if I call SSL_read() in a loop like so:

   do {
      SSL_read(x, ...);
   } while(SSL_pending(x));

   it will read once from the socket, and then return all of the data
which was fetched; it won't leave data in the buffer, and it won't sit
in the loop for as long as data is arriving from the peer.

   Can I rely on this behaviour to stay the same in future OpenSSL
versions?

-- 
Michael Playle, Software Engineer, ANT Ltd.
phone +44 1223 716418 - fax +44 1223 716401
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to