CTR Pia
4.11.3
Game Communication Engine
|
Base class that manages information specific to updating session conditions. More...
Public Member Functions | |
NexUpdateSessionSetting () | |
The default constructor. | |
virtual | ~NexUpdateSessionSetting () |
The destructor. | |
nn::Result | GetApplicationData (u8 *pDataBuf, size_t *pDataSize, size_t dataBufSize) const |
Gets 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... | |
u16 | GetMaxParticipants () const |
Gets the 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 | SetAttributes (u32 attributes[nn::pia::inet::ATTRIBUTE_MAX_SIZE]) |
Sets attributes for the session. More... | |
void | SetDescription (const wchar_t *description) |
Specifies the description string for the session. More... | |
void | SetDisconnectionRate (u32 disconnectionRate) |
Updates the disconnection rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED . More... | |
void | SetMaxParticipants (u16 max) |
Sets the maximum number of participants for the session. More... | |
void | SetMinParticipants (u16 min) |
Sets the minimum number of participants for the session. More... | |
void | SetNintendoCountryCode (u32 countryCode) |
Updates 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 | SetRatingValue (u32 ratingValue) |
Updates the rating value to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED . More... | |
void | SetSelectionPriority (u8 priority) |
Specifies the matchmaking priority when a session with the same requirements is found. More... | |
void | SetSessionType (SessionType sessionType) |
Specifies the session type for the session. More... | |
void | SetSessionUserPassword (const wchar_t *pUserPassword, size_t passwordLength) |
Sets the user password. More... | |
void | SetUpdateGeoIp (bool b) |
Sets the IP address to use for getting a distance over the Internet during nn::pia::inet::SELECTION_METHOD_SCORE_BASED . More... | |
void | SetViolationRate (u32 violationRate) |
Updates the violation rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED . More... | |
Base class that manages information specific to updating session conditions.
Only the settings of the value specified for the update are updated. No specification is needed for settings that are not being updated.
2015-03-20 Added APIs to set parameters for scored matchmaking.
2014-01-21 Initial version.
nn::Result nn::pia::inet::NexUpdateSessionSetting::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.
u32 nn::pia::inet::NexUpdateSessionSetting::GetAttribute | ( | u32 | index | ) | const |
Gets the specified attribute.
[in] | index | Specifies the index for the attribute to get. |
const wchar_t* nn::pia::inet::NexUpdateSessionSetting::GetDescription | ( | ) | const |
Gets the specified description string.
u16 nn::pia::inet::NexUpdateSessionSetting::GetMaxParticipants | ( | ) | const |
Gets the maximum number of participants.
u16 nn::pia::inet::NexUpdateSessionSetting::GetMinParticipants | ( | ) | const |
Gets the specified minimum number of participants.
SessionType nn::pia::inet::NexUpdateSessionSetting::GetSessionType | ( | ) | const |
Gets the specified session type.
nn::Result nn::pia::inet::NexUpdateSessionSetting::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 a pointer to the buffer for the application-defined data for the session. |
[in] | size | Specifies the size of the application-defined data for the 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::NexUpdateSessionSetting::SetAttributes | ( | u32 | attributes[nn::pia::inet::ATTRIBUTE_MAX_SIZE] | ) |
Sets attributes for the session.
[in] | attributes | Specifies an array of attributes. |
void nn::pia::inet::NexUpdateSessionSetting::SetDescription | ( | const wchar_t * | description | ) |
Specifies the description string for the session.
[in] | description | The description string. |
void nn::pia::inet::NexUpdateSessionSetting::SetDisconnectionRate | ( | u32 | disconnectionRate | ) |
Updates 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::NexUpdateSessionSetting::SetMaxParticipants | ( | u16 | max | ) |
Sets the maximum number of participants for the session.
[in] | max | Specifies the maximum number of participants for the new session. |
void nn::pia::inet::NexUpdateSessionSetting::SetMinParticipants | ( | u16 | min | ) |
Sets the minimum number of participants for the session.
[in] | min | Specifies the minimum number of participants for the new session. |
void nn::pia::inet::NexUpdateSessionSetting::SetNintendoCountryCode | ( | u32 | countryCode | ) |
Updates 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::NexUpdateSessionSetting::SetOpenParticipation | ( | bool | isOpen | ) |
Sets whether participation in this session is possible.
Specifies whether the session can be joined.
[in] | isOpen | Specifies whether the session updated by this NexUpdateSessionSetting function is joinable. Set to true to enable. |
void nn::pia::inet::NexUpdateSessionSetting::SetRatingValue | ( | u32 | ratingValue | ) |
Updates 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::NexUpdateSessionSetting::SetSelectionPriority | ( | u8 | priority | ) |
Specifies the matchmaking priority when a session with the same requirements is found.
Specifies the matchmaking priority for the new session. Enabled only when searches are performed with nn::pia::inet::SELECTION_METHOD_BROADEN_RANGE_WITH_SELECTION_PRIORITY
and nn::pia::inet::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::NexUpdateSessionSetting::SetSessionType | ( | SessionType | sessionType | ) |
Specifies the session type for the session.
Updates are only possible from inet::SESSION_TYPE_FRIEND
to inet::SESSION_TYPE_ANYBODY
.
[in] | sessionType | Specifies the session type. |
void nn::pia::inet::NexUpdateSessionSetting::SetSessionUserPassword | ( | const wchar_t * | pUserPassword, |
size_t | passwordLength | ||
) |
Sets the user password.
Specifies the session's user password for the session.
[in] | pUserPassword | Specifies the user password. |
[in] | passwordLength | Specifies the string length of the user password. |
void nn::pia::inet::NexUpdateSessionSetting::SetUpdateGeoIp | ( | bool | b | ) |
Sets the IP address to use for getting a distance over the Internet during nn::pia::inet::SELECTION_METHOD_SCORE_BASED
.
[in] | b | Specifies whether to update GeoIp . |
void nn::pia::inet::NexUpdateSessionSetting::SetViolationRate | ( | u32 | violationRate | ) |
Updates 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. |