cURL / Mailing Lists / curl-library / Single Mail

curl-library

UNSUBSCRIBE

From: Dick Fleming <dickfleming_at_hypermediadesign.com>
Date: Mon, 07 Sep 2009 08:04:47 -0400

-- 
President - Hypermedia Design - dickfleming_at_hypermediadesign.com
dickfleming_at_hypermediadesign.com
Chief Operating Officer - Collaboration Studios
dickfleming_at_collabortionstudios.com
207-348-5230 (voice)
207-669-8375 (FAX)
www.hypermediadesign.com
www.collaborationstudios.com
--CS Finalist in TechMaine's "TECHNOLOGY COMPANY OF THE YEAR AWARD" !!!
Read all about it:  http://www.collaborationstudios.com
> From: Dimitar Dimitrov <silent.cutthroat_at_gmail.com>
> Reply-To: libcurl development <curl-library_at_cool.haxx.se>
> Date: Mon, 7 Sep 2009 13:47:19 +0300
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: curl_multi_socket_action and speed limits
> 
> On Mon, Sep 7, 2009 at 1:43 AM, Daniel Stenberg<daniel_at_haxx.se> wrote:
>> Right, but it should also set a timeout so that after a given time it should
>> call your timer callback, you call libcurl and it should put the socket back
>> in the game again. If not, it bugs.
> 
> And I think it shouldn't remove the socket in first place, but set a
> zero event mask. Adding/removing sockets may be more costly on the
> event loop than just disabling events.
> 
>> How is that a fix? How does libcurl then tell the app that it shouldn't care
>> about traffic on that particular socket for now since it is "too fast" ?
> 
> Ah, yes. Obviously it's not. As effect it just hogs the CPU...
> 
>> Can you see why the timeout doesn't trigger, or if it does trigger why it
>> doesn't put the socket back in the game correctly?
> 
> The initial timeout is too large and I don't see anywhere new timeout
> set. Sketch of the execution of this last call to ..._socket_action:
> 
> - curl_multi_socket_action
>   - multi_socket
>       - multi_runsingle
>           = changes state to TOOFAST
>       - singlesocket
>           - multi_getsock
>               =  state is TOOFAST, it doesn't return any sockets
>           = sees socket as removed
>               = calls user callback with REMOVE
>               -  sh_delentry(multi->sockhash, s) [multi.c:1804]
>               = remove the socket from the easy handle? [multi.c:1810]
> ...
> 
>> Can you provide us with a small app that repeats this problem?
> 
> Attached examples/hiperfifo.c with some speed limit.
> 
Received on 2009-09-07