I've just released POE::Component::Client::HTTP 0.894 to PAUSE. It
adds an X-PCCH-Peer header to all responses. The header contains the
socket's remote address and port, separated by a dot. "127.0.0.1.309"
represents port 309 on localhost.
X-PCCH-Peer will contain the proxy's address.port if the client is
connecting to a proxy.
--
Rocco Caputo - rcap...@pobox.com
On Jan 27, 2010, at 11:02, Doreen Grey wrote:
Hello all,
I've built a web client application with
POE::Component::Client::HTTP. I followed the examples in the
cookbook (http://poe.perl.org/?POE_Cookbook/Web_Client) and
everything works fine.
In my 'got_response' function I need to process the IP address of
the host this response came from. Let's say the $response->uri is http://poe.perl.org
, then I'll need the IP address 67.207.145.70 of that host.
Of course I could do an additional lookup of that host:
DB<11> print inet_ntoa(inet_aton('poe.perl.org'))
67.207.145.70
But because POE has already resolved this name, why should I have to
do it again. So, is there a way to access the remote IP address in
the 'got_response' function?
Thanks for your help!
Doreen
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla
Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser