curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Aborting a transfer using curl_multi_remove_handle()

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 Apr 2018 23:43:36 +0200 (CEST)

On Mon, 2 Apr 2018, Philip Prindeville wrote:

>> You remove the easy handle from the multi handle, that effectively stopped
>> that transfer
>
> Okay, thanks. In the context of the example, then, what additional logic
> would be necessary?
>
> I guess I’d have to locate the matching sockinfo_t and then call remsock()
> to get libevent to forget about it?

Not even that. When curl_multi_remove_handle() is called, it will update the
socket callback if there's an update needed, like removal of a socket etc.

You just need to call curl_multi_remove_handle() on the right spot for the
right handle.

-- 
  / daniel.haxx.se

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