cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_fdset alternatives

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 9 Sep 2005 23:06:49 +0200 (CEST)

On Fri, 9 Sep 2005, Alexander Lazic wrote:

> My main point was libcurl have sockets and poll()/select on these, the app
> have sockets an $POLL on these, therefor when i use curl_multi_socket() the
> poll()/select() of the libcurl i can't influence, i hope i have say it
> clearer.

Right. The application can't influence that, no, but it has no need to. If the
app just selects/polls/your-favourite-poll-replacement on the sockets and tell
libcurl what socket that had action with curl_multi_socket() then the lib can
do it any way it likes internally, without it affecting the application.

Possibly it should just trust the application and don't do any select/poll at
all!

> The app must know which are his own sockets an which are the libcurl
> sockets, imho.

Oh yes it really should, since among other things it should tell libcurl when
action has been dected on libcurl's sockets and not otherwise.

>>> I think this is the major problem because some functions make their own
>>> socket()/connect() calls.
>>
>> The application's sockets, connects etc are not a concern of libcurl. The
>> application deals with its own sockets.
>
> Yes but when i call the *easy* or *multi* functions they make some
> handshakes, such as ssl or ftp or whatever, how can i see if the protocol
> handshakes was ok or nok?

First, this curl_multi_socket() thing of course implies using the multi
interface.

But then, why would the application care or even want to know about the
connect/handshake status of each connection? It makes no difference to it.

> I think we need some more states then:
...

> 5 CURL_CONNECT_OK - the protocol handshake was ok
> 6 CURL_CONNECT_NOK - the protocol handshake was nok

What for? The application waits for "action" on libcurl's sockets and then it
tells libcurl there is action. Nothing more.

>> This fix, together with added HTTP pipeling support, ought to make libcurl
>> outperform most of the competition.
>
> What is higher in your priority list, if you have one ;-)?

Since I might get funded for this task, I'm waiting for that to get decided
until I proceed with this topic. I expect to get further info no later than
October.

But in general my TODO is flexible and if I'm not totally occupied by people's
problems on the lists or keeping the web site in shape, I usually pick an
issue in docs/TODO or docs/KNOWN_BUGS that I feel is challanging.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-09-09