On Tue, 25 Aug 2015, Frank Meier wrote:

I take this opportunity to ask: shouldn't we improve the interface of getting the active socket even more? What I suggested earlier [1] was to enable CURLINFO_LASTSOCK to retrieve the "active" socket when called while the request is in progress, and retrieve the last used socket if called when the request is done (and the connection still exists). I guess that was discarded since it meant to change an existing API.

It wasn't discarded, it was just not handled. I've been meaning to get back to that, and that was also to some extent a reason for the suggested name for this new option.

As long as we document this funtionality clearly I see no problem with being able to extract the socket earlier. Apart perhaps for opening up the slight risk that some users will shoot themselves in their feet.

I plea to have a look at my patch again, and consider it to be adapted to work with the new CURLINFO_ACTIVESOCKET while letting CURLINFO_LASTSOCK unchanged.

I actually think it only makes it more complicated to have them work differently.

I was secretly hoping that at least one other human on earth would be intersted in the feature and speak up for or against the feature, but otherwise it has just been one of those items in my TODO list I haven't gotten around to.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to