CTR-NEX 3.0 features improve stability and include several new features that were added since CTR-NEX 2.7.3. The following list describes the main changes.
Note that starting in version 3.0, the CTR-NEX library is incompatible with game servers that use CTR-NEX 2.7.3 or earlier. (Conversely, the libraries for CTR-NEX 2.7.3 and earlier are incompatible with game servers that use CTR-NEX 3.0.0.)
Considerations when Moving to CTR-NEX 3.0
nex.h
, but when other header files are included the include path must be changed.Core::SetTerminateImmediately
static function is now part of the Core
member function, set by nn::nex::Core::GetInstance()->SetTerminateImmediately(true);
.Core::UseThreads
, Core::UseTransportBufferThread
, and Core::SelectThreadSafeExecution
. Also, Core::SetTransportBufferThreadMode
was removed. Always use the Core::SetThreadMode
function to set the threading mode.Core::SetThreadMode
are ThreadModeUnSafeTransportBuffer
and ThreadModeSafeTransportBuffer
.Feature Additions and Changes
DirectStream
, which fixes the issue with reliable communications in DirectTransport
building up and sessions ending, can now be used. DirectTransport
remains for compatibility reasons, but is not recommended for ending sessions.Station::SetLocalPlayerName
function, and get the names and IDs for the stations by using the Station::GetPlayerName
function and the Station::GetPrincipalID
function.Considerations when Moving to CTR-NEX 3.0
maxSessions
in nn::socket::Initialize
.SystemError::SetErrorHandlingFunction
when an error occurs was removed. Now, check for errors every frame with NetZ::GetFatalError
, and immediately destroy the NetZ instance and end the match if an error occurs.DirectTransport
, DirectStream
returns a qResult
. Also, up to 1300 bytes (or up to 1250 bytes if the network topology is not a P2P network) can be transferred.Station::RegisterOperationBeginCallback
and Station::RegisterOperationEndCallback
for stations that join or leave a session.nn::nex::
namespace to SESSION_ROLE_UNDEFINED
, SESSION_ROLE_MASTER
, and SESSION_ROLE_DUPLICA
, which can be obtained using the Session::GetRole
function.Session::GameOver
and Session::DestroySession
instead of RootTransport::SetTerminateDOCoreTimeout
. For more information, see the Finalizing NetZ section in the Programming Manual.InitDOClasses
function in the application when user DOs are not used, as it was in NEX 2.x.Feature Additions and Changes
MatchmakeExtensionClient::AutoMatchmake
, MatchmakeExtensionClient::CreateMatchmakeSession
, and MatchmakeExtensionClient::JoinMatchmakeSession
now return a session key that is shared by the participants in a matchmaking session.HostMigrationCallback
constructor. Normally you specify the MatchMakingClient::StaticUpdateSessionHost
function.MatchmakeExtensionClient::AutoMatchmake
function that takes a list of candidate matchmaking session IDs, and tries joining each item in the list in turn. If it is unable to join any of the candidates, it then creates a matchmaking session.MatchmakeExtensionClient::BrowseMatchmakeSession
function that returns the URL of the matchmaking session host with the search result.Feature Additions and Changes
Evaluate
function).u64
parameters are now used instead of u32
parameters.RankingClient::GetStats
function, which gets statistics by score category.Feature Additions and Changes
DataStoreChangeMetaParam::SetDeletePermission
to DataStoreChangeMetaParam::SetUpdatePermission
, and DataStorePreparePostParam::SetDeletePermission
to DataStorePreparePostParam::SetUpdatePermission
. Also added a password mechanism for accessing and updating, allowing users without pre-assigned privileges to perform operations. For more information, see the Privileges and Passwords section in the Programming Manual.u64
) data IDs are now used instead of 32-bit (u32
) data IDs.DataStoreClient::GetObject
function that uses a buffer to get the data size.DataStoreConstants::RATING_LOCK_PERMANENT
lock type.DataStoreClient::GetMeta
function that allows multiple DataStoreGetMetaParam
instances to be specified and retrieved with a single call.Feature Additions and Changes
DebugClient
class for recording to the server a log of the APIs called when communicating with the server, and for referencing that call log. For more information, see the programming manual.DebugClient::SetExcludeJoinedMatchmakeSession
function, which can remove the restriction of the MatchmakeExtensionClient::AutoMatchmake
function that excludes participation in matchmaking sessions that were joined in the past.CONFIDENTIAL