It seems to me that when the Curl_Send function
returns 0, then either the openssl statemachine had returned
SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE.

 rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen);

 if(rc < 0) {
   err = SSL_get_error(conn->ssl[sockindex].handle, rc);

   switch(err) {
   case SSL_ERROR_WANT_READ:
   case SSL_ERROR_WANT_WRITE:
     /* The operation did not complete; the same TLS/SSL I/O function
        should be called again later. This is basicly an EWOULDBLOCK
        equivalent. */
     return 0;

Depending on that one must select for reading or writing,
(in a loop), but how?

http://www.openssl.org/docs/ssl/SSL_get_error.html

Reply via email to