nn::socket::GetPeerName Function

Syntax

s32 GetPeerName(
     s32 s,
     SockAddrIn * sockAddr
);

Arguments

Name Description
in s Specifies a socket descriptor. Specify a socket descriptor created using the Socket or Accept function.
in sockAddr Specifies a pointer to the socket address structure used to get the communication target's address information.

Return Values



Value Description
0 Process was successful.
ENETRESET Socket library is not initialized.
EBADF Invalid socket descriptor.
ENOTCONN Either not connected, or the previously specified peer is not there.

Description

Gets the socket's remote address.

The remote address is the address of the communication target of the socket.

See Also

GetSockName

Revision History

2010/06/14
Initial version.

CONFIDENTIAL