> > > Is your socket non-blocking? > > > No, socket is blocking. When I run s_client in non-blocking mode it > > doesn't get stuck. > > You can't use 'select' reliably with blocking sockets. Well, it is > possible > to do so, but it is extremely difficult and can only be done with OpenSSL > using bio pairs or some other mechanism where you do all the I/O. Why are > your sockets blocking? And if you want to block, what is 'select' doing for > you?
Well, we are talking about s_client here... part of openssl executable. select() is used with the blocking sockets to make sure that, well, they don't block. If you call SSL_read on a blocking socket when select says it is readable you expect it not to block [forever]. Of course it might block if there is some data available on the underlying socket but not enough to complete SSL deciphering, but under normal circumstances it will only block until the rest of the record is received. Am I missing something? ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]