The Wayback Machine - https://web.archive.org/web/20151203184633/http://perldoc.perl.org:80/functions/getsockname.html

Perl version

Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

getsockname

Perl 5 version 22.0 documentation

Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled, or are running a non-JavaScript capable web browser.

To get the best experience, please enable JavaScript or download a modern web browser such as Internet Explorer 8, Firefox, Safari, or Google Chrome.

Recently read

getsockname

  • getsockname SOCKET

    Returns the packed sockaddr address of this end of the SOCKET connection, in case you don't know the address because you have several different IPs that the connection might have come in on.

    1. use Socket;
    2. $mysockaddr = getsockname(SOCK);
    3. ($port, $myaddr) = sockaddr_in($mysockaddr);
    4. printf "Connect to %s [%s]\n",
    5. scalar gethostbyaddr($myaddr, AF_INET),
    6. inet_ntoa($myaddr);
 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.