Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

Tools

getpeername

Perl 5 version 8.8 documentation
Recently read

getpeername

  • getpeername SOCKET

    Returns the packed sockaddr address of other end of the SOCKET connection.

    1. use Socket;
    2. $hersockaddr = getpeername(SOCK);
    3. ($port, $iaddr) = sockaddr_in($hersockaddr);
    4. $herhostname = gethostbyaddr($iaddr, AF_INET);
    5. $herstraddr = inet_ntoa($iaddr);