nn::ir::CTR::Communicator::WaitConnection Member Function

Syntax

static Result WaitConnection();

Arguments

None.

Return Values

Returns the function's result. Returns one of the Result values listed below.

Value Description
Result::IsSuccess Process was successful.
ResultBufferInsufficient The buffer was insufficient so the connection process could not proceed.
ResultAlreadyConnected Already in the connected state.
ResultAlreadyTryingToConnect Connection being authenticated.
ResultMachineSleep Sleeping because the system is in Sleep Mode.
ResultFatalError The IR module may be malfunctioning.

Description

Waits for a connection request and then tries making an authenticated connection.

This function returns control before connection authentication with the partner is completed.

When a connection request is received, this function returns a connection reply to the partner CTR system and then transitions to the connected state. This function will wait until a connection request comes, so if you want to abort the process call the Disconnect function.

If the connection succeeds, this is signaled by the event returned by the GetConnectionStatusEvent function.

The system always waits after connection authentication. If data have been provided by the Send function, the system sends the data packets after it has received all incoming data and then waits again.

If the size of the region used to save incoming and outgoing packets—as passed to the Initialize function—is smaller than that defined by NECESSARY_BUFFER_SIZE_FOR_CONNECTION or if the size of the region used to manage packets is smaller than GetManagementSize(1), the connection cannot be authenticated and this function fails.

Revision History

2011/08/30
Initial version.

CONFIDENTIAL