> Hi I have problem, > > Is there any function in Openssl, that says me, that connection > is active?? I create a new TCP connection with BIO_do_connect, it > returns me, that connection was established. Than I make some > another things in my program, after a while a send through this > connection some data, but it returns me, that connection was closed. > I need some function is_connected(bio), that says me, if the > connection is still active. > > thanks for help
The normal way to do this is simply to try a non-blocking receive. If there is any data to receive, you need to get that data anyway, so you might as well do both things in the same step. It is unusual to say "I don't want to receive any data on this connection if there is any, but I want to know what condition it's in". If you know that there can't be any data (because of the protocol), you can still try a read. If you get 'would block' you know the connection is fine. If you get an error or you get data, you know something is wrong. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]