Re: non-blocking sockets: poll() or select()?

From: Simon Elliott (Simon)
Date: 09/30/05


Date: 30 Sep 2005 10:44:25 GMT

On 30/09/2005, Maxim Yegorushkin wrote:

> > I'm designing some code which will use non blocking sockets. The
> > code uses a single socket. Is it better to use poll() or select()
> > for this, or isn't there much to choose between them?
>
> poll() does not impose the maximum discriptor count it can handle like
> select() does, and code with poll() looks somewhat less clumsy.

poll(0 also allows a bit more granularity of events. Can I set the
timeout to zero?

-- 
Simon Elliott    http://www.ctsn.co.uk


Relevant Pages