On 29/07/15 18:07, Frank Meier wrote:
On 25/07/15 01:03, Daniel Stenberg wrote:
That change alone would not make this a reliable method. You need to write documentation and test cases too. And I think I would be fine with it, it seems like an easy change that shouldn't break anything existing.
I take you up on this. I wrote a slightly different patch, that does primary retrieve the active connection socket if the session handle is still used, otherwise it retrieves the last used connection. I also updated the documentation and added a testcase (1532).

Hi Daniel

I saw my last message looks strange if I look at it in the archives (http://curl.haxx.se/mail/lib-2015-07/0145.html), as the patch seems to be detached from the mail. I used "git format-patch" to generate the patch but I don't understand how this could happen. It looks ok with my other clients and in the gmane archive though (http://article.gmane.org/gmane.comp.web.curl.library/46025). So apologies if my patch messed something up.

Anyway do you have any comment on my patch (0001-getconnectinfo-also-retrieves-active-connection.patch)? To clarify, I started with the mentioned pull request, but saw that the behaviour what you get from curl_get_info(... CURLINFO_LASTSOCKET ...) is quite different between the easy and multi interface. So I tried to adapt the code in a way that the behaviour should be nearly the same. The function now returns the last used or the current connection. This is what the test1532 tries to demonstrate.

Note, before it was possible to retrieve the connection that was used in the previous request while the easy-handle is already being used with a new connection. This would be no longer possible now, but I think this was more unexpected behaviour and worked only with the easy-interface. eg LASTSOCKET had to be retrieved inside a callback function while easy-perform() is in progress.


cheers, Frank


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

Reply via email to