Skip to main content Perl Documentation Logo

    No results

  • Perl versions

    5.30

    5.30.0

    5.28

    5.28.2 5.28.1 5.28.0

    5.26

    5.26.3 5.26.2 5.26.1 5.26.0

    5.24

    5.24.4 5.24.3 5.24.2 5.24.1 5.24.0

    5.22

    5.22.4 5.22.3 5.22.2 5.22.1 5.22.0

    5.20

    5.20.3 5.20.2 5.20.1 5.20.0

    5.18

    5.18.4 5.18.3 5.18.2 5.18.1 5.18.0

    5.16

    5.16.3 5.16.2 5.16.1 5.16.0

    5.14

    5.14.4 5.14.3 5.14.2 5.14.1 5.14.0

    5.12

    5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0

    5.10

    5.10.1 5.10.0

    5.8

    5.8.9 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0

    5.6

    5.6.2 5.6.1 5.6.0
  • Manuals
    Overview Tutorials FAQs Changes License Language Functions Operators Variables Pragmas Utilities Internals Platforms
  • Modules
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  • Functions
    A-Z By Category
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Home  > Language reference > Functions > getpeername

Perl 5 version 16.1 documentation

getpeername

Perl functions A-Z | Perl functions by category | The 'perlfunc' manpage
  • getpeername SOCKET

    Returns the packed sockaddr address of the 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);
  • Site info

  • Docs mantained by Perl 5 Porters
  • Perldoc site development sponsored by OpusVL Logo
  • Manuals

  • Overview
  • Tutorials
  • FAQs
  • Changes
  • Reference

  • Language
  • Functions
  • Operators
  • Variables
  • Modules

  • Modules
  • Pragmas
  • Utilities
  • Misc

  • License
  • Internals
  • Platforms
perldoc.perl.org - Official documentation for the Perl programming language
This website is a Beta release. For any issues please raise a ticket on GitHub