> But as per the behavior of the Edge triggered epoll,
> the epoll_wait will raise event only if it receives a data
> after putting this in the read event of epoll every time.
> Does this affect the behavior of SSL_read / SSL_write. If any
> one implements the server using epoll ET can you please let me
> know that there is any special case that needs to taken care
> for SSL.

It works just fine. There are a few special cases, but they all come down to
this: Any time you either make forward progress or have an indication that
forward progress is possible, re-attempt *all* pending operations (read or
write), not just the one you think should now be possible.

The ugliest possible case is probably this one:

1) You call SSL_write, but negotiation is not finished (or re-negotiation is
in progress). You get a 'want read' indication. Forward progress is not
possible until some data is read.

2) The negotiation data arrives on the socket.

3) You call SSL_read and get a 'want read' indication because no application
data is available, however, this processes the negotiation data.

4) You don't retry the SSL_write, because you got a 'want read' indication
the last time you tried it and don't realize the 'SSL_read' made forward
progress.

An SSL_read call that returns 'want read', sadly, may have made forward
progress.

DS


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

Reply via email to