perldoc > getsockname(mcp)

    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.

                use Socket;
                my $mysockaddr = getsockname($sock);
                my ($port, $myaddr) = sockaddr_in($mysockaddr);
                printf "Connect to %s [%s]\n",
                   scalar gethostbyaddr($myaddr, AF_INET),
                   inet_ntoa($myaddr);

Generated by phpman v9.9.10-40-g5952757 · Markdown · JSON Author: Che Dong Under GNU General Public License
2026-10-09 05:46 @216.73.217.31
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!