cURL / Mailing Lists / curl-library / Single Mail


Re: OPENSOCKETFUNCTION hook not called for all socket creations on Windows

From: Christian Hägele <>
Date: Wed, 14 Dec 2011 22:01:27 +0000 (UTC)

Daniel Stenberg <daniel <at>> writes:
> It would unfortunately imply a rather drastic code modification, and one that
> would also have to affect for example c-ares to be fully covering. If I
> understand you correctly it would also break both API and ABI and thus warrant
> new stuff to get added and the old way to be preserved for existing
> applications which feels like... not a good idea.

The needed code modification would only change an implementation detail. No API
would break. It only guarantees that the CURLMOPT_SOCKETFUNCTION is called with
the CURL_POLL_REMOVE action before the socket is closed via closesocket or the
CURLOPT_CLOSESOCKETFUNCTION. Right now it sometimes works in this order, too, but
not guaranteed. This behavioral change should not break any existing applications
using the multi-api.

But if the code changes needed are rather drastic I understand that there are
more important things to do. And if the documentation is clear about it the user
can be prepared for that behavior and it shouldn't be a problem.



List admin:
Received on 2011-12-14