curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Close sockets asynchronously when using libdispatch (GCD)

From: Frederik Seiffert via curl-library <>
Date: Fri, 20 Jan 2023 11:52:41 +0100

> Am 16.01.2023 um 19:24 schrieb Dan Fandrich via curl-library <>:
> IMHO, that sounds like a good approach. curl assumes POSIX semantics on sockets
> which allow them to be closed at any time. If your environment doesn't allow
> that, then hooking in to CURLOPT_CLOSESOCKETFUNCTION sounds like a good way
> to maintain those semantics.

Unfortunately it seems that in some cases when using multi handles this "close socket function" is not being used, so I don’t think this approach would fully work atm:

Would the multi handle API also need open/close functions to be added in order for this to be supported? Sorry I’m not familiar with how sockets are being used between easy and multi handles.


Received on 2023-01-20