You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Marco Spinetti <m....@pisa.iol.it> on 2004/01/22 15:40:26 UTC
Info
Is no blocking IO (using select) supported by apr?
Can you give me some advice of the functions where I can see?
Thanks
--Marco
Re: Info
Posted by Jeff Trawick <tr...@attglobal.net>.
Marco Spinetti wrote:
> Is no blocking IO (using select) supported by apr?
instead of select, use apr_poll()
> Can you give me some advice of the functions where I can see?
to make a socket non-blocking:
use apr_socket_option_set() with option APR_SO_NONBLOCK
or apr_socket_timeout_set() with timeout 0
to make a pipe non-blocking:
use apr_pipe_timeout_set() with timeout 0
polling on sockets is portable to all APR platforms
polling on pipes does not work on Windows