If you get SSL_ERROR_WANT_WRITE, even if you have no application data
to send, the protocol itself requires data to be written -- so you
need to call SSL_write().  If you get SSL_ERROR_WANT_READ, even if
you're writing application data, that means that the protocol itself
is requiring data to be read from the peer, so you need to call
SSL_read().

Both situations can happen in either case.  If you have no data to
write, call it with a NULL buffer and a length of 0.

-Kyle H

On 8/19/06, Steven Young <[EMAIL PROTECTED]> wrote:
  I'm a little unclear on how this should be implemented.. so if I call
SSL_read, get -1 back, and err = SSL_ERROR_WANT_READ, do I just call
SSL_read again? Because that's what I've been doing and it ends up
in an infinite loop.  Also, is err = SSL_ERROR_WANT_WRITE, but I have
no data to write (because I'm waiting to see what the server sends me
before replying), what should I write in my call to SSL_write?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to