nn::socket::Bind Function

Syntax

s32 Bind(
     s32 s,
     const SockAddrIn * sockAddr
);

Arguments

Name Description
in s Specifies a socket descriptor. Specify a socket descriptor created using the Socket function.
in sockAddr Specify a pointer to a socket address structure (SockAddrIn) with information about the address to assign.

Return Values

Returns 0 if successful.

Description

Allocates a local socket address to a socket.

The local socket address is the address on the communication source side. A socket created using the Socket function is not initially bound to any address. This function fails if the specified socket descriptor is already bound. You can get the allocated local socket address with xxxx.

See Also

Socket, GetSockName

Revision History

2010/06/14
Initial version.

CONFIDENTIAL