On Fri, Apr 15, 2005, Edward Chan wrote: > I have an app where reads and writes happen from different threads. Now, > ideally, one would envision that I just replace the reads/writes with > SSL_read/SSL_write. Now I know it is not as simple as that. >
If you read and write the same stream in different threads that's a problem as this isn't supported. Some people have reported success by using appropriate locking. > What exactly is the meaning of the SSL_ERROR_WANT_READ/WRITE errors? > Irrespective of the call that returned that error it has the same meaning: the underlying transport (socket) has indicated that data cannot be currently read or written and that the call should be retried when that is possible. So if you get SSL_ERROR_WANT_READ you might typically select on the socket until data can be read. If you get SSL_ERROR_WANT_WRITE you do the same but until data can be written: due to internal buffering you wont often see SSL_ERROR_WANT_WRITE. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]