develooper Front page | perl.perl5.porters | Postings from December 2008

Local socket endpoint IP?

Thread Next
Mark J. Reed
December 15, 2008 18:02
Local socket endpoint IP?
Message ID:
I'm attempting to determine which local interface is used to access a remote
machine.  After successfully opening a TCP socket:

     my $sock = IO:Socket::INET->new(PeerAddr=>$remotehost,
PeerPort=>$remoteport, Proto=>'tcp') or die;

I tried calling sockhost:

     print $sock->sockhost, "\n";

but that just prints out  So how do I find out the actual endpoint

Mark J. Reed <>

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About