> Hi, > Can anyone tell me if SSL_peek is a blocking or non-blocking call ?
It can be either. > When I use it inside my code, then the program blocks on this fuction call > where there is no data on the socket. If you're using blocking socket calls, that's what will happen. > The reason I want to use this call is that before closing the SSL > connection > by using 'SSL_shutdown', I want to make sure that there is no pending data > present on this connection. SSL_peek won't help. You need to call SSL_shutdown first and then check for any pending data. No matter when and how you call SSL_peek, there will still be a point before you call SSL_shutdown and after you call SSL_peek. If your protocol requires you to do this, the protocol is broken and really should be fixed. If it doesn't, why do this? > Is there any method to make the call SSL_peek non-blocking,i.e. it should > return if there is no data present on SSL connection like that > happens with > tcp peek by using option MSG_PEEK|MSG_DONTWAIT. > Or can SSL_pending be used for this purpose? > Please suggest... > I am using openSSL version 0.9.7b. What is your outer problem? Why do you think you need to do this? What protocol are you implementing over SSL? DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]