nn::friends::CTR::Login Function

Syntax

Result Login(
     os::Event * pEvent
);

Arguments

Name Description
in pEvent Specifies a pointer to nn::os::Event, which signals that asynchronous processing is complete. Initialize this ahead of time using the nn::os::Event::Initialize function.

Return Values

Returns the result of the operation.

Description

Requests a login to the server.

If this function returns successfully asynchronous processing begins. The event nn::os::Event specified in the argument is signaled when asynchronous processing completes. Call the nn::friends::CTR::GetLastResponseResult function to get the result of the asynchronous operation. If this function fails, no asynchronous processing occurs.

You must call nn::ac::Connect before this function to establish a connection with an access point. This function returns a value of nn::friends::ResultAcNotConnected if it is called while a connection has not been established with an access point.

When the local host is disconnecting from a server in the background, this function temporarily returns nn::friends::ResultTemporarilyBusy. In such cases, this function may succeed if you call it again after waiting a relatively short period of time.

This function also succeeds if it is called when the local host is already logged in. In such cases, the asynchronous processing instantly completes successfully.

The local host is definitely online when the asynchronous processing succeeds.

Revision History

2010/08/16
Initial version.

CONFIDENTIAL