Don't ask to ask, just ask | |
PerlMonks |
perlfunc:getsocknameby gods (Initiate) |
on Aug 24, 1999 at 22:42 UTC ( [id://234]=perlfunc: print w/replies, xml ) | Need Help?? |
getsocknameSee the current Perl documentation for getsockname. Here is our local, out-dated (pre-5.6) version: getsockname - retrieve the sockaddr for a given socket
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); |
|