> SSL_accept always returns < 0 error. With SSL_get_error I found that the > error is SSL_ERROR_WANT_READ. > During debugging and troubleshooting, I realised that when I use "normal" > blocking windows socket, SSL_accept works fine. > > Why using non-blocking windows socket caused that error ?
This is expected behavior. Because the socket is non-blocking, it returns an error rather than blocking. If you would rather it block than return an error, use blocking sockets. The SSL_accept cannot complete immediately because data from the other side cannot be read at this moment (since the other side has not sent it yet or it hasn't gotten here yet). Since the socket is non-blocking, it cannot wait for the data to arrive. So it returns an error, and the error (SSL_ERROR_WANT_READ) explains that it wants to read from the socket, but cannot do so because the socket is non-blocking. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]