Access IP address in POE::Component::Client::HTTP

"Doreen Grey" <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.