Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
CURLINFO_ACTIVESOCKET doc is misleading #5299
I did this
While investigating a mailing list question I observed that CURLINFO_ACTIVESOCKET does not actually return the active socket until after the transfer is done. This appears to be due to legacy reasons, since it is a replacement for CURLINFO_LASTSOCKET.
The socket can only be retrieved via ACTIVESOCKET after lastconnect is set, which only happens in multi_done:
I expected the following
The documentation says "Pass a pointer to a curl_socket_t to receive the active socket used by this curl session." That implies the socket is available before the session is done.
Reported-by: Jay Satiro Fixes #5299