you might want to take a look at the functionsSSL_pending - (tells you there is data to read on the SSL socket before trying to read )
BIO_pending
Perry Milan Křápek wrote:
Hi, I have a question. I have multithread system, with non blocking I/O and perhaps 100 connections to servers. I have a special thread, that waits on select(). When it returns me, that I have some data for reading, I start the reading for every connection. When the select throws me timeout, I start the readig too, because it´s possible that some data came, while I was doing previous reading.I have two types of connection. One TCP, where I use for reading the BIO_read function and one TLS where I use the SSL_read function. Now I have this problem. When I try to read data from some connection, it is posible, that there is not any data. I have read, that when there is not any data, the BIO_read function throws me 0 or -1, but these return values can mean error too. How can I recognize, that this means, that I read only 0b of data? And I have the similar problem with SSL_read. I use SSL_get_error function to determine, what hapen in reading, but I havent find what error code it returns me, when I read no data? Will it be SSL_ERROR_NONE or SSL_ERROR_ZERO_RETURN? I apologize for my English. Thanks for answer. Milan Křápek ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature