Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

Tools

getpeername

Perl 5 version 26.0 documentation
Recently read

getpeername

  • getpeername SOCKET

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

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