| Low-level socket functionsFind the other end of a socket connectionDaftar Isi - getpeername SOCKET
Returns the packed sockaddr address of the other end of the SOCKETconnection. - use Socket;
- $hersockaddr = getpeername(SOCK);
- ($port, $iaddr) = sockaddr_in($hersockaddr);
- $herhostname = gethostbyaddr($iaddr, AF_INET);
- $herstraddr = inet_ntoa($iaddr);
|
| |
|