CTR Pia  4.11.3
Game Communication Engine
nn::pia::inet::NexCreateSessionSetting Class Reference

Class that manages settings specific to session creation. More...

+ Inheritance diagram for nn::pia::inet::NexCreateSessionSetting:

Public Member Functions

 NexCreateSessionSetting ()
 The default constructor.
 
virtual ~NexCreateSessionSetting ()
 The destructor.
 
nn::Result GetApplicationData (u8 *pDataBuf, size_t *pDataSize, size_t dataBufSize) const
 Gets specified application-defined data. More...
 
size_t GetApplicationDataSize () const
 Gets the size of the specified application-defined data. More...
 
u32 GetAttribute (u32 index) const
 Gets the specified attribute. More...
 
const wchar_t * GetDescription () const
 Gets the specified description string. More...
 
u32 GetGameMode () const
 Gets the specified game mode. More...
 
u16 GetMaxParticipants () const
 Gets the specified maximum number of participants. More...
 
u16 GetMinParticipants () const
 Gets the specified minimum number of participants. More...
 
SessionType GetSessionType () const
 Gets the specified session type. More...
 
nn::Result SetApplicationData (const u8 *pData, size_t size)
 Sets application-defined data. More...
 
void SetAttribute (u32 index, u32 value)
 Sets the attributes for the new session. More...
 
void SetCommunityId (u32 gid)
 Sets the associated community ID. More...
 
void SetDescription (const wchar_t *description)
 Sets the description string for the new session. More...
 
void SetDisconnectionRate (u32 disconnectionRate)
 Sets the disconnection rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetGameMode (u32 gameMode)
 Sets the game mode for the new session. More...
 
void SetMaxParticipants (u16 max)
 Sets the maximum number of participants for the session to create. More...
 
void SetMinParticipants (u16 min)
 Sets the minimum number of participants for the session to create. More...
 
void SetNintendoCountryCode (u32 countryCode)
 Sets the country code to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetOpenParticipation (bool isOpen)
 Sets whether participation in this session is possible. More...
 
void SetOverrideIpAddress (const wchar_t *pIpAddress, size_t ipAddressLength)
 Sets the IP address for debugging to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetRatingValue (u32 ratingValue)
 Sets the rating value to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetSelectionPriority (u8 priority)
 Sets the matchmaking priority when a session with the same requirements is found. More...
 
void SetSessionType (SessionType sessionType)
 Sets the session type for the new session. More...
 
void SetSessionUserPassword (const wchar_t *pUserPassword, size_t passwordLength)
 Sets the user password. More...
 
void SetViolationRate (u32 violationRate)
 Sets the violation rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void UseGeoIp (bool b)
 Sets whether to use position information (longitude and latitude, country code) for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 

Detailed Description

Class that manages settings specific to session creation.


Revision History:

2015-03-20 Added APIs to set parameters for scored matchmaking.

2014-05-16 Added the SetSessionUserPassword() function.

2014-02-03 Initial version.

See also
nn::pia::session::CreateSessionSetting

Member Function Documentation

nn::Result nn::pia::inet::NexCreateSessionSetting::GetApplicationData ( u8 *  pDataBuf,
size_t *  pDataSize,
size_t  dataBufSize 
) const

Gets specified application-defined data.

Parameters
[in]pDataBufSpecifies a pointer to a buffer from which to copy the specified application-defined data.
[in]pDataSizeSpecifies the size of the data written to the copy buffer.
[in]dataBufSizeSpecifies the copy buffer size.
Returns
Returns a Result value indicating success if the application-defined data is acquired successfully.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that either the buffer pointer is NULL or the pointer returned by the copied size is NULL. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that no application-defined data is set. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultBufferShortage Indicates that the set application-defined data cannot be copied because it is greater in size than the buffer. Programming error. Fix your program so that this error is not returned.

size_t nn::pia::inet::NexCreateSessionSetting::GetApplicationDataSize ( ) const
inline

Gets the size of the specified application-defined data.

Returns
Returns the size of the application-defined data.
u32 nn::pia::inet::NexCreateSessionSetting::GetAttribute ( u32  index) const

Gets the specified attribute.

Parameters
[in]indexSpecifies the index for the attribute to get.
Returns
Returns the specified attribute value.
const wchar_t* nn::pia::inet::NexCreateSessionSetting::GetDescription ( ) const

Gets the specified description string.

Returns
Returns the specified description string.
u32 nn::pia::inet::NexCreateSessionSetting::GetGameMode ( ) const

Gets the specified game mode.

Returns
Returns the specified game mode.
u16 nn::pia::session::CreateSessionSetting::GetMaxParticipants ( ) const
inlineinherited

Gets the specified maximum number of participants.

Returns
Returns the specified maximum number of participants.
u16 nn::pia::session::CreateSessionSetting::GetMinParticipants ( ) const
inlineinherited

Gets the specified minimum number of participants.

Returns
Returns the specified minimum number of participants.
SessionType nn::pia::inet::NexCreateSessionSetting::GetSessionType ( ) const

Gets the specified session type.

Returns
Returns the specified session type.
nn::Result nn::pia::inet::NexCreateSessionSetting::SetApplicationData ( const u8 *  pData,
size_t  size 
)

Sets application-defined data.

Specify a size that does not exceed inet::APPLICATION_DATA_BUFFER_MAX_SIZE.

Parameters
[in]pDataSpecifies the buffer for the application-defined data for the new session.
[in]sizeSpecifies the size of the application-defined data the new session.
Returns
Returns a Result value indicating success if the application-defined data is set successfully.
Error Return Values:
nn::pia::ResultInvalidArgument Indicates that either the buffer pointer was NULL or the specified data size was too big. Programming error. Fix your program so that this error is not returned.
void nn::pia::inet::NexCreateSessionSetting::SetAttribute ( u32  index,
u32  value 
)

Sets the attributes for the new session.

Parameters
[in]indexSpecifies the index of the attribute for the new session.
[in]valueSpecifies the value of the attribute for the new session.
void nn::pia::inet::NexCreateSessionSetting::SetCommunityId ( u32  gid)

Sets the associated community ID.

This session can only be found in the search results for players who used the same community ID for searching in inet::NexSessionSearchCriteria::SetCommunityId. In addition, it is required when linking with the NEX ranking feature. For information about linking with the ranking feature, see the documentation about persistent gathering for the NEX.

void nn::pia::inet::NexCreateSessionSetting::SetDescription ( const wchar_t *  description)

Sets the description string for the new session.

Parameters
[in]descriptionSpecifies the description string for the new session.
void nn::pia::inet::NexCreateSessionSetting::SetDisconnectionRate ( u32  disconnectionRate)

Sets the disconnection rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

We recommend using NEX's MatchmakeReferee feature.

Parameters
[in]disconnectionRateSpecifies the disconnection rate.
void nn::pia::inet::NexCreateSessionSetting::SetGameMode ( u32  gameMode)

Sets the game mode for the new session.

Parameters
[in]gameModeSpecifies the game mode for the new session.
void nn::pia::session::CreateSessionSetting::SetMaxParticipants ( u16  max)
inlineinherited

Sets the maximum number of participants for the session to create.

Parameters
[in]maxThe maximum number of participants specified for the session to create.
void nn::pia::session::CreateSessionSetting::SetMinParticipants ( u16  min)
inlineinherited

Sets the minimum number of participants for the session to create.

Parameters
[in]minThe minimum number of participants specified for the session to create.
void nn::pia::inet::NexCreateSessionSetting::SetNintendoCountryCode ( u32  countryCode)

Sets the country code to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Sets the country code to use when you have configured to not use location information with UseGeoIP() or when you have configured to use that location information but it was not available. The specified country code is not used when location information is available. When a country code is not set, and when you have configured to not use location information with UseGeoIP() or when you have configured to use that location information but it was not available, the default value is used as the score for comparing country codes.

Parameters
[in]countryCodeSpecifies the country code.
void nn::pia::inet::NexCreateSessionSetting::SetOpenParticipation ( bool  isOpen)

Sets whether participation in this session is possible.

Sets whether the new session is to be created as joinable. When not set, it is created as not joinable.

Parameters
[in]isOpenWhen set to true, the new session created by this NexCreateSessionSetting function is joinable.
void nn::pia::inet::NexCreateSessionSetting::SetOverrideIpAddress ( const wchar_t *  pIpAddress,
size_t  ipAddressLength 
)

Sets the IP address for debugging to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Use this IP address instead of your own to get location information using GeoIP. Only available for debugging.

Parameters
[in]pIpAddressSpecifies the replacement IP address.
[in]ipAddressLengthSpecifies the IP address string length.
void nn::pia::inet::NexCreateSessionSetting::SetRatingValue ( u32  ratingValue)

Sets the rating value to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Parameters
[in]ratingValueSpecifies the rating value.
void nn::pia::inet::NexCreateSessionSetting::SetSelectionPriority ( u8  priority)

Sets the matchmaking priority when a session with the same requirements is found.

Sets the matchmaking priority for the new session. If unspecified, it is set to 0. Enabled only when searches are done with nn::pia::inet::SELECTION_METHOD_BROADEN_RANGE_WITH_SELECTION_PRIORITY or SELECTION_METHOD_SCORE_BASED. If a value that exceeds nn::pia::inet::SESSION_MAX_SELECTION_PRIORITY is provided as an argument, nn::pia::inet::SESSION_MAX_SELECTION_PRIORITY is set instead.

Parameters
[in]prioritySpecifies the matchmaking priority.
void nn::pia::inet::NexCreateSessionSetting::SetSessionType ( SessionType  sessionType)

Sets the session type for the new session.

Parameters
[in]sessionTypeSpecifies the session type for the new session.
void nn::pia::inet::NexCreateSessionSetting::SetSessionUserPassword ( const wchar_t *  pUserPassword,
size_t  passwordLength 
)

Sets the user password.

Sets a user password for the new session.

Parameters
[in]pUserPasswordSpecifies the user password.
[in]passwordLengthSpecifies the string length of the user password.
void nn::pia::inet::NexCreateSessionSetting::SetViolationRate ( u32  violationRate)

Sets the violation rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

We recommend using NEX's MatchmakeReferee feature.

Parameters
[in]violationRateSpecifies the violation rate.
void nn::pia::inet::NexCreateSessionSetting::UseGeoIp ( bool  b)

Sets whether to use position information (longitude and latitude, country code) for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

When not setting whether to use position information, the score for comparing distance uses the default score for rating.

Parameters
[in]bSpecifies whether to use position information.