Dr. Stephen Henson wrote:
Ah sorry been a while since I've done this kind of stuff. Try making an
initial call to BIO_do_accept() outside the main loop. The first call should
set up the accept BIO and the second one check for an incoming connection.
No worries! I appreciate any help. I've been banging my head against
the wall for 5 days now and haven't made any progress, so I don't mind
trying different things.
If that doesn't work I'll check some code I have which does use accept BIOs
and non-blocking I/O in a server application.
Note sure I follow what you mean here. I have two functions,
openSSLSocket which sets up the socket, which basically does this:
ret = BIO_new_accept(hostString);
if (ret != NULL)
{
/* set the accept socket to non-blocking */
BIO_set_nbio_accept(ret, 1);
/* set sockets created from this accept socket to
non-blocking */
BIO_set_nbio(ret, 1);
BIO_set_bind_mode(ret, BIO_BIND_REUSEADDR);
/* bind & listen */
if (BIO_do_accept(ret) < 0)
... set error and return ret else just return ret ...
Then I have the startListening function which I outlined in my previous
message. So I have a startup type function which does something like
this (not the real code here):
BIO* theBio = openSSLSocket(hostString);
... if no error ...
startListening(theBio);
Is that not correct?
Thanks again
-Jim
Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]