On Tue, Sep 04, 2007, Jim Marshall wrote:

> Jim Fox wrote:
> >
> >Doesn't need a faq.  The man page says the purpose of the 
> >BIO_set_nbio_accept macro is to set blocking or non-blocking mode.  
> >Seems like that's what it will do.
> >
> >Jim
> >
> >On Sep 3, 2007, at 11:31 AM, Jim Marshall wrote:
> >
> >>Jim Marshall wrote:
> >>>I'm looking at using non-blocking I/O in some places in my code, and 
> >>>I have a question. The 'BIO_set_nbio_accept' says it will set the 
> >>>underlying socket to blocking/non-blocking mode, but all the examples 
> >>>and stuff I see say to use 
> >>>'BIO_socket_ioctl(SSL_get_fd(ssl),FIONBIO,&sl)'. Can 
> >>>'BIO_set_nbio_accept' be used to change the state of an SSL socket?
> >>>Thank you
> >>>Jim
> 
> Yes I know that, but all the examples I have seen do not use this macro. 
> As an aside I tried using it this past weekend and it did not seem to 
> work, the socket was not set to non-blocking mode as I expected.
> 

That works on an accept BIO and sets the accept socket to non-blocking mode.

The macro BIO_set_nbio() sets BIOs to non-blocking mode in general. However
note that this only takes place during initialization so if you make the call
after the BIO has been used (e.g. connected or I/O performed) it wont work.

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]

Reply via email to