On Wed, Sep 12, 2007, Jim Marshall wrote: > Hi Steve, > Thanks again for your help. What you suggested is very similar to what > I was doing orginally (although I was using errno and not > BIO_should_retry). When the code is setup as you describe (see code > below) what happens is that the first couple of times the 'select' call > is made it returns with a -1 with errno set to EINTR. If I let it > continue it does this like 4 times and then select 'seems' to start > working, in that it will actually timeout (wait 2 seconds before > returning). However client connections are never detected. For example > if I connect with the openssl command line tool, the tool says > > "CONNECTED(00000003)" > > But select just continues to return 0 (and the app pauses for 2 seconds > at a time). >
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. 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. 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]