Sudarshan Soma wrote: > I have added SSL_pending after select call just to ensure that data is > even not present in SSL buffers, incase select returns no data.
That just makes more work for you. Unless you have some good reason not to, you should just call SSL_read. If there is data already received (by the socket, not by OpenSSL), SSL_pending won't tell you and you'll wind up calling 'select' just to break out of it immediately. > Should i add the same login for SSL_ERROR_WANT_READ: > SSL_ERROR_WANT_WRITE and then do a SSL_read. If you want to read, you should call SSL_read. If you want to write, you should call SSL_write. If either of these operations returns a WANT_READ or WANT_WRITE indication, you should retry the operation when 'select' tells you that the socket is ready for an operation in the appropriate direction (or something else has changed). DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
