If you get SSL_ERROR_WANT_WRITE or SSL_ERROR_WANT_READ, you must call the function that last returned that error with exactly the same parameters (in this case, the pointer to "abc123") until it doesn't return that state.
The pointer must be exactly the same pointer to exactly the same memory that has not been overwritten or free()'d. SSL_ERROR_WANT_WRITE means that something has happened such that the state machine cannot progress at all until it has written something out, which it can only do if the socket is writeable. "abc123" would not have been successfully written in that case. SSL_ERROR_WANT_READ means that the state machine can't progress at all unless it can read (hopefully a full packet) from the socket. -Kyle H On Mon, May 11, 2009 at 2:30 AM, Asanka Kumara <[email protected]> wrote: > Non-Blocking socket. > > called SSL_write with data (say 'abc123') and socket 'h'. Then ' > SSL_get_error' found error code SSL_ERROR_WANT_WRITE. > > after some time call to 'select' detected that socket 'h' is writable. (Does > it mean that data 'abc123' was written successfully ?) > > Then I have to insert more data (say 'def567'). So before inserting this > data should I re-insert 'abc123' data too ? > > > > Thank you, > Asanka. > ******************************************************************************************************************************************************************* > > "The information contained in this email including in any attachment is > confidential and is meant to be read only by the person to whom it is > addressed. If you are not the intended recipient(s), you are prohibited from > printing, forwarding, saving or copying this email. If you have received > this e-mail in error, please immediately notify the sender and delete this > e-mail and its attachments from your computer." > > ******************************************************************************************************************************************************************* > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected]
