![]() |
|
Just another Perl shrine | |
PerlMonks |
perlfunc:getpeernameby gods (Initiate) |
on Aug 24, 1999 at 22:43 UTC ( [id://350]=perlfunc: print w/replies, xml ) | Need Help?? |
getpeernameSee the current Perl documentation for getpeername. Here is our local, out-dated (pre-5.6) version: ![]() getpeername - find the other hend of a socket connection
![]() getpeername SOCKET
![]() Returns the packed sockaddr address of other end of the SOCKET connection.
use Socket; $hersockaddr = getpeername(SOCK); ($port, $iaddr) = unpack_sockaddr_in($hersockaddr); $herhostname = gethostbyaddr($iaddr, AF_INET); $herstraddr = inet_ntoa($iaddr); |
|