Hi Stephen,
I tried with retry logic as well (though earlier it was also same), but same
result.
int retryCounter = 0;
while(retryCounter < CONNECT_MAX_TRY)
{
int retVal = BIO_do_connect(conn);
if(retVal <= 0)
{
if(BIO_should_retry(conn))
{
retryCounter++;
sleep(CONNECT_SLEEP_INTERVAL);
continue;
}
else
{
cout << " The Bio_do_connect failed" << endl;
}
}
}
Just wanted to let you know that this piece of code is same at time when I
used BIO_new_connect() followed by BIO_set_nbio() and Bio_do_connect() with
similar code mentioned above, then things were working fine. This time
rather than using Bio_new_connect(), I used socket(), connect() and
Bio_new_socket() API call followed by bio_set_nbio() and Bio_do_connect()
(as suggested by you), then things started failing.
Please let me know if you have any suggestions or help me in pointing out
the issue.
Thanks
Akanksha Shukla.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dr. Stephen Henson
Sent: Sunday, October 23, 2011 1:45 AM
To: [email protected]
Subject: Re: Open SSL API's Support For IPv6.
On Sat, Oct 22, 2011, Akanksha Shukla wrote:
>
> 5) BIO_set_nbio(conn, 1);
>
> 6) int retVal = BIO_do_connect(conn);
>
> if(retVal <= 0)
>
> {
>
> cout << " The Bio_do_connect failed" << endl;
>
> }
>
>
>
> After executing the program, I am getting output as :
>
> The socket is created successfully
>
> The socket is connected successfully
>
> Bio_do_connect failed
>
You aren't calling BIO_do_connect() correctly. A <= 0 return value isn't
necessarily an error it may be a request to retry the operation. See the BIO
manual pages for more information.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]