curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Timeout with curl multi on connection refused on windows

From: Philippe Daouadi <philippe.daouadi_at_tanker.io>
Date: Fri, 17 Feb 2017 15:28:46 +0100

On 02/16/2017 02:24 PM, Daniel Stenberg wrote:
> The socket monitoring works the same way to the application,
> independent of libcurl's internal state. You setup a socket callback
> with CURLMOPT_SOCKETFUNCTION and libcurl calls that function and tells
> you which sockets to wait for and for what activities you should
> monitor on them. Then you call libcurl when such an activity has been
> detected.
>
> That should work also for detecting a failed connection.
>
Oh, now it makes sense! I didn't notice that curl called the
socketfunction with CURL_POLL_OUT just after the asynchronous connect()
call is done. So the issue may be in boost's async_write_some never
calling me back when the connection fails. I will try to ask for help to
boost guys then.

Thanks for your help! :)

Philippe
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-17