Hi, In my project I try to set up TCP connection. It works fine on Unix 
systems, but when I try it on Windows I have problem.
For connecting I use the non blocking BIO.
Here is part of the code I use:

BIO_set_nbio (bio,1);

int rc = -1;
while (rc <= 0){
  rc = BIO_do_connect(bio);
  if (rc<=0){
    if (!BIO_should_retry(bio)){
      return (OT_ERROR);
    }
  }
}

I set BIO to nonblocking and than I try to connect, until it connects or throws 
an error.
On windows system I have this problem, this code is finished even the 
connection wasnt established.
I try connection to another computer, that I disconnect from LAN. In unix 
system, it throws error, but in windows, it says me that connect was 
succesfully established :o(

Please what should I do. I need some advice how to recognize if the connection 
is avaiable.
I used to try select function. Guarding the filedesriptor of bio, and watching 
if this socket is writeable. but it never happen.

thanks for response
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to