Kyle Hamilton:

> OpenSSL is not a true emulation of the socket layer of the OS.  It has
> to do more work (public-key cryptography is more work than almost
> anything else outside of physics models), and there is a combination
> of several operations it has to do in the handshake, beyond the
> initial SYN|SYN/ACK and FIN|FIN/ACK of TCP.  OpenSSL is a library
> which does not operate in its own thread (since it's impossible to
> guarantee threading semantics on all platforms it runs on), and thus
> cannot perform tasks in the background while other application code is
> running.

Arguably, the semantics are precisely the same. In both cases, a non-blocking 
operation makes as much forward progress as it is possible to make without 
waiting for the other side of the connection to do anything. Neither guarantees 
a "timely return". If the amount of forward progress that can be made is large, 
the delay can be large as well.

Non-blocking does not mean "return fast". It just means not to wait for the 
other side. Many real world, non-blocking operations can take very long periods 
of time. Try reading a gigabyte from /dev/urandom on Linux.

In any event, 11mS could just be due to a context switch.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to