I wouldn't advise that. Read the docs:
"When calling |SSL_write()| with num=0 bytes to be sent the behaviour is
undefined."
I still stand by me first reply on this thread, as I believe it follows
directly from the docs.
Read the docs on SSL_read() and SSL_write().
SSL_ERROR_WANT_WRITE does not mean call SSL_write(). It means the
exactly same SSL function you just did with the exact same parameters as
you ust did that produced this SSL_ERROR_WANT_WRITE return. Again, it's
clearly explained in the docs.
Joe
Kyle Hamilton wrote:
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]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]