getsockname - Perldoc Browser

You are viewing the version of this documentation from Perl 5.005_02. View the latest version
#getsockname SOCKET

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

use Socket;
$mysockaddr = getsockname(SOCK);
($port, $myaddr) = unpack_sockaddr_in($mysockaddr);

AltStyle によって変換されたページ (->オリジナル) /