I have yet another question regarding non-blocking I/O and the OpenSSL library.
With normal sockets that have been set to non-blocking, an attempt to read
when no data is present will return an EAGAIN.

In my case, no data on a read is fine, since that just means there are no messages to 
pick up.

Before the call to SSL_read, I could call select to check to make sure there is 
nothing ready. But,
from our previous discussion, select might indicate that there is data available that 
is protocol
related (renegotiation). This would cause me to call SSL_read.

>From my reading of the SSL_read man page, if I call SSL_read and there is no data, I 
>will
receive a WANT_READ error (or possibly a WANT_WRITE) if the underlying media can't
fulfill the request.

It is also my understanding that should I get a "WANT" result, the only thing I can do
is to retry the call when it can be fulfilled. However, if "no data" is a valid 
condition,
and I receive a WANT result, then does that mean I can't call SSL_WRITE to send a 
message?

How can I allow the library to handle renegotiations, but also be able to handle the 
situation
where there is no application data?

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

Reply via email to