CTR Pia  4.11.3
Game Communication Engine
nn::pia::inet Namespace Reference

Represents the PiaInet namespace.
. More...

Classes

struct  DebugSetting
 (For debugging.) This structure stores the debug feature settings that are passed to nn::pia::inet::SetDebugSetting. More...
 
class  NexCreateSessionSetting
 Class that manages settings specific to session creation. More...
 
class  NexDebugSession
 (For debugging.) This class handles dummy sessions for debugging. More...
 
class  NexFacade
 Represents the NEX library facade (interface wrapper) class. More...
 
class  NexJoinSessionSetting
 Class that manages settings specific to NEX session participation. More...
 
class  NexNetworkFactory
 This class creates the necessary classes for networks using the NEX library (Internet communication) (factory pattern). More...
 
class  NexSessionInfo
 Data class for Internet communication sessions. More...
 
class  NexSessionSearchCriteria
 The search condition class used when searching for a session. More...
 
class  NexSessionSearchCriteriaOwner
 The condition class used when searching for a session. More...
 
class  NexSessionSearchCriteriaParticipant
 The search condition class used when searching for a community. More...
 
class  NexUpdateSessionSetting
 Base class that manages information specific to updating session conditions. More...
 
struct  Setting
 Stores parameters used by the Initialize function. More...
 

Enumerations

Functions

nn::Result BeginSetup (void)
 Declares the start of setup. More...
 
nn::Result Bind (u32 localAddress)
 Registers a local address. More...
 
virtual session::IMatchmakeSession * CreateMatchmakeSession ()
 Instantiates an IMatchmakeSession object for the session.
 
virtual session::MeshLayerController * CreateMatchMeshLayerController ()
 Instantiates a MeshLayerController object for the session.
 
virtual session::ISessionInfoListCreateSessionInfoList (u8 browseSessionInfoListNum)
 Instantiates an ISessionInfoList object for the session.
 
nn::Result EndSetup (void)
 Declares the end of setup. More...
 
void Finalize (void)
 Finalizes the inet module.
 
virtual u8 GetBrowseSessionInfoListMax () const
 Gets the maximum number of session search results.
 
virtual session::HostMigrationMode GetHostMigrationMode () const
 Gets the host migration mode.
 
virtual bool GetNecessaryBind () const
 Gets whether a call to Bind is required.
 
virtual bool GetNecessaryServer () const
 Gets whether a server is required.
 
nn::Result Initialize (const Setting &setting)
 Initializes the inet module. More...
 
bool IsInitialized (void)
 Indicates whether the inet module is initialized. More...
 
LanSessionSearchCriteria & operator= (const LanSessionSearchCriteria &r)
 Assignment operator. More...
 
nn::Result SetDebugSetting (const DebugSetting &debugSetting)
 (For debugging.) Configures the inet debugging feature. More...
 
void Unbind ()
 Deletes the information on the registered local address. More...
 

Variables

const size_t APPLICATION_DATA_BUFFER_MAX_SIZE = 384
 The maximum size that can be set as application-defined data.
 
const size_t ATTRIBUTE_MAX_SIZE = 6
 The number of attributes that can be specified in a session.
 
const size_t DEFAULT_MTU_SIZE = 1240
 Defines the default MTU that is specified in Setting.
 
const size_t MAX_MTU_SIZE = 1364
 Defines the maximum MTU that can be specified in Setting.
 
const size_t MIN_MTU_SIZE = 576
 Defines the minimum MTU that can be specified in Setting
 
const size_t PARTICIPANT_ARRAY_MAX_SIZE = 16
 The maximum length of the Principal ID array for users that can be specified in the search conditions.
 
const size_t SEARCH_CRITERIA_MAX_NUM = 2
 The maximum number of search conditions that can be specified.
 
const u32 SESSION_BROADEN_RANGE_ATTRIBUTE_INDEX = nn::nex::MATCHMAKE_SESSION_BROADEN_RANGE_ATTRIBUTE_INDEX
 Index of the base attribute value when selecting sessions with range broadening.
 
const u8 SESSION_MAX_SELECTION_PRIORITY = nn::nex::MAX_PROGRESS_SCORE
 Maximum configurable game progress score.
 
const u32 SESSION_SYSTEM_PASSWORD_LENGTH = nn::nex::MATCHMAKE_SESSION_SYSTEM_PASSWORD_LENGTH
 The system password's string length.
 
const u32 SESSION_UPDATE_SELECTION_PRIORITY_MINIMUM_INTERVAL_TIME = nn::nex::UPDATE_PROGRESS_SCORE_MINIMUM_INTERVAL_TIME
 Minimum update interval for the game progress score.
 
const u32 SESSION_USER_PASSWORD_LENGTH = nn::nex::MAX_MATCHMAKE_SESSION_USER_PASSWORD_LENGTH
 The user password's string length.
 

Detailed Description

Represents the PiaInet namespace.
.

Revision History:

2012-07-18 Added Result values specific to the inet module. pia::inet::NexFacade::StartNatSession now returns nn::pia::ResultDnsFailed.

2012-07-13 inet::Initialize now returns ResultInvalidState if Pia does not support NEX thread mode.

2012-05-30 Changed the arguments to Initialize so the MTU can now be specified.

Enumeration Type Documentation

Enumerates the selection methods for joining sessions when random matchmaking is in force.

Enumerator
SELECTION_METHOD_RANDOM 

Random selection.

SELECTION_METHOD_BROADEN_RANGE_WITH_SELECTION_PRIORITY 

Selected by range broadening and matchmaking priority.

SELECTION_METHOD_SCORE_BASED 

Selected by score-conversion format.

Enumerates the session types.

Enumerator
SESSION_TYPE_ANYBODY 

Anybody can participate.

SESSION_TYPE_FRIEND 

Participation is only possible when there is a friend relationship with the host.

Function Documentation

nn::Result nn::pia::inet::BeginSetup ( void  )

Declares the start of setup.

Call this function before creating a singleton in the inet module. Call this function and the EndSetup function even when the application does not create any singletons in the inet module.

Returns
Returns a Result value indicating success if it is called at the right time. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:

nn::pia::ResultNotInitialized Indicates that the function for initializing the inet module has not been called. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.

nn::Result nn::pia::inet::Bind ( u32  localAddress)

Registers a local address.

Registers the IP address assigned locally. Call this function before calling the session::Session::Startup function.

Returns
Returns the result of the function. If this function call fails, one or more of the following Result values is returned. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:
nn::pia::ResultInvalidArgument Indicates that there is an error in an argument. Programming error. Fix your program so that this error is not returned.
nn::Result nn::pia::inet::EndSetup ( void  )

Declares the end of setup.

Call this function after creation of a singleton in the inet module is complete. Calling this function configures memory to be used by the inet module singletons, and optimizes memory management within the library. Always call the BeginSetup function and this function even if the application does not create any singletons in the inet module.

Returns
Returns a Result value indicating success if it is called at the right time. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:

nn::pia::ResultNotInitialized Indicates that the function for initializing the inet module has not been called. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.

nn::Result nn::pia::inet::Initialize ( const Setting setting)

Initializes the inet module.

Returns
Returns a Result value indicating success if initialization succeeds. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultAlreadyInitialized Indicates that the module is already initialized. Programming error. Fix your program so that this error is not returned.

See also
Setting
bool nn::pia::inet::IsInitialized ( void  )

Indicates whether the inet module is initialized.

Returns
Returns true if initialized, or false otherwise.
LanSessionSearchCriteria& nn::pia::inet::operator= ( const LanSessionSearchCriteria &  r)

Assignment operator.

Parameters
[in]rThe object to assign.
Returns
See this object.
nn::Result nn::pia::inet::SetDebugSetting ( const DebugSetting debugSetting)

(For debugging.) Configures the inet debugging feature.

This function can be called when there is no inet instance.

If isEnableNatErrorEmulation of the DebugSetting structure is set to true, this setting makes NAT transversal fail on an error.

If this function is not called, all related debugging features are disabled.

Attention
Do not call this function in retail ROMs.
Returns
Returns the result of the function. On success, returns a Result value for which the IsSuccess() function returns true. This function always succeeds.
void nn::pia::inet::Unbind ( )

Deletes the information on the registered local address.

Call this function after calling the session::Session::Cleanup function.