On Fri, Sep 27, 2013 at 07:49:06AM -0700, Roger Miller wrote:

> My initial call to 'connect' was returning 'WSAEWOULDBLOCK' (to
> be expected on a non-blocking socket).

At that point the appropriate thing to do is to select the socket
for write in your event loop.  Once the socket reports ready
(connected or connection failed), you should query the connection
status with:

        int error;
        socklen_t len = sizeof(error);

        getsockopt(SOL_SOCKET, SO_ERROR, &error, &len);

or if that does not work on Windows, call getpeername()
to see whether you're connected.

Only once the connection is complete, should you attempt to call
SSL_connect().

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to