cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Which name for a 5 argument Curl_select() ?

From: Yang Tse <yangsita_at_gmail.com>
Date: Sun, 18 Mar 2007 01:11:27 +0100

2007/3/17, Daniel Stenberg wrote:

> On Sat, 17 Mar 2007, Yang Tse wrote:
>
> > If I haven't missed any at least we still have five calls in the library to
> > select(2). Those calls are not being granted the poll() benefits that
> > Curl_select() provides for systems that have a fine poll().
>
> Ah right, indeed they should be addressed!
>
> > hostares.c (line 147) and hostares.c (line 213)
> >
> > Those two could be probably changed to Curl_select() without much hassle.
>
> Yeps.
>
> > easy.c (line 420)
> >
> > This one could also be probably changed to Curl_select() since current
> > implementation of curl_multi_fdset() actually doesn't use the error or
> > exception fd_set.
>
> Indeed! And the code isn't even currently in use... Although we should try to
> keep it working as I still plan and hope to switch to that one day in the
> future.

Eeeeeek!! I've changed my analysis, mind and conclusion !!

hostares.c (line 147) In this one since the timeout used in select()
is zero it could be changed to use Curl_select() looping over both
fd_sets and changing them accordingly. Not pretty at all and maybe
even unreliable, but could be done.

hostares.c (line 213) and easy.c (line 420) Both of them use a
non-zero timeout and actually operate on fd_sets. So the only way to
do it is with select(2) or a full replacement. Unles I'm wrong again.

If finally done, and the 5 args select() replacement would be called
Curl_select(), which would be the replacement name for actual
Curl_select() ?

-- 
-=[Yang]=-
Received on 2007-03-18