cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-python mailing list Archives

pyCurl : get IP address of the peer socket

From: ferrety ferrety <yferrety_at_gmail.com>
Date: Tue, 9 Sep 2008 00:52:45 +0200

Hi List,

I'd like to know how to get the "IP address" of the peer socket when
downloding a URL with pycurl.

After a bit of googling, I found this:
 sock = curl.getinfo(pycurl.LASTSOCKET);

But it's seems to only return a socket file descriptor which is an integer.
What I'd like to have is a full python "socket" object to use it like this:

ipaddr, port = sock . getpeername()

Advices please?

Thanks in advance

cheers
Ferret
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2008-09-09

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET