CTR Pia
4.11.3
Game Communication Engine
|
Class that manages settings specific to session creation. More...
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... | |
Class that manages settings specific to session creation.
2015-03-20 Added APIs to set parameters for scored matchmaking.
2014-05-16 Added the SetSessionUserPassword()
function.
2014-02-03 Initial version.
nn::Result nn::pia::inet::NexCreateSessionSetting::GetApplicationData | ( | u8 * | pDataBuf, |
size_t * | pDataSize, | ||
size_t | dataBufSize | ||
) | const |
Gets specified application-defined data.
[in] | pDataBuf | Specifies a pointer to a buffer from which to copy the specified application-defined data. |
[in] | pDataSize | Specifies the size of the data written to the copy buffer. |
[in] | dataBufSize | Specifies the copy buffer size. |
Result
value indicating success if the application-defined data is acquired successfully.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.
|
inline |
Gets the size of the specified application-defined data.
u32 nn::pia::inet::NexCreateSessionSetting::GetAttribute | ( | u32 | index | ) | const |
Gets the specified attribute.
[in] | index | Specifies the index for the attribute to get. |
const wchar_t* nn::pia::inet::NexCreateSessionSetting::GetDescription | ( | ) | const |
Gets the specified description string.
u32 nn::pia::inet::NexCreateSessionSetting::GetGameMode | ( | ) | const |
Gets the specified game mode.
|
inlineinherited |
Gets the specified maximum number of participants.
|
inlineinherited |
Gets the specified minimum number of participants.
SessionType nn::pia::inet::NexCreateSessionSetting::GetSessionType | ( | ) | const |
Gets 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
.
[in] | pData | Specifies the buffer for the application-defined data for the new session. |
[in] | size | Specifies the size of the application-defined data the new session. |
Result
value indicating success if the application-defined data is set successfully.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.
[in] | index | Specifies the index of the attribute for the new session. |
[in] | value | Specifies 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.
[in] | description | Specifies 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.
[in] | disconnectionRate | Specifies the disconnection rate. |
void nn::pia::inet::NexCreateSessionSetting::SetGameMode | ( | u32 | gameMode | ) |
Sets the game mode for the new session.
[in] | gameMode | Specifies the game mode for the new session. |
|
inlineinherited |
Sets the maximum number of participants for the session to create.
[in] | max | The maximum number of participants specified for the session to create. |
|
inlineinherited |
Sets the minimum number of participants for the session to create.
[in] | min | The 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.
[in] | countryCode | Specifies 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.
[in] | isOpen | When 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.
[in] | pIpAddress | Specifies the replacement IP address. |
[in] | ipAddressLength | Specifies 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
.
[in] | ratingValue | Specifies 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.
[in] | priority | Specifies the matchmaking priority. |
void nn::pia::inet::NexCreateSessionSetting::SetSessionType | ( | SessionType | sessionType | ) |
Sets the session type for the new session.
[in] | sessionType | Specifies 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.
[in] | pUserPassword | Specifies the user password. |
[in] | passwordLength | Specifies 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.
[in] | violationRate | Specifies 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.
[in] | b | Specifies whether to use position information. |