curl-library
Re: Multi-interface: the multi-uv example doesn't work with a localhost WWW service
Date: Mon, 6 Oct 2014 21:47:30 +0200
>
> That's strange. How is a local server any different to a remote server for
> libcurl? Or is it just that it is easier to trigger the problem locally as
> the server is very low-latency then?
>
yeah, looks like that.
Actually I've got it working. I compared the hiperfifo.c (
http://curl.haxx.se/libcurl/c/hiperfifo.html) example (using libevent) and
the only one difference in events handling is that the event loop timer
callback calls 'curl_multi_info_read' (via 'check_multi_info') after
'curl_multi_socket_action', which seems to do help in such low latency
cases.
Extracting the 'curl_multi_info_read' while loop from 'curl_perform' to
separated method (like in hiperfifo.c) and a call to it from the end of
'on_timeout' just did the work.
> I would suspect then that the example needs improvement, but I don't know
> libuv and I'm personally not in the mood for chasing this problem... :-/
>
understood, I wouldn't care about calling localhost that much if it
wouldn't be my use case ;)
Would you like me to send the improved example, or is the above report
clear enough for you?
Best,
Waldek
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-06