> // Receiving WANT_READ during an SSL_write
> bool writeSuccess = false;
> while (!writeSuccess) {
>       ret = SSL_write(...)
>
>       if (ssl_Error(ret) == SSL_ERROR_WANT_WRITE) {
>               // Wants a write, just re-try the operation.
>               Continue;
>       }

Why are you retrying the operation? If it couldn't write to the socket a
split-second ago, what makes you think it can now?

Perhaps the basics still aren't clear:

1) You call SSL_write when you want to give some plaintext to have SSL
encrypt and send to the other side.

2) If an operation returns WANT_WRITE, it means it needs to be able to write
to the socket to complete the operation and could not do so at that time.

SSL_write is when you want to write *PLAINTEXT* to the logical SSL
connection. WANT_WRITE is about writing *CIPHERTEXT* to the socket. They
refer to writing totally different things to totally different places.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to