Class MultiplayerSystem

Inheritance Relationships

Base Type

Class Documentation

class MultiplayerSystem : public csp::systems::SystemBase

Public facing system that allows interfacing with Magnopus Connected Services’ multiplayer api.

Offers methods for managing realtime state via REST calls.

Public Functions

MultiplayerSystem(csp::web::WebClient *WebClient, csp::systems::SpaceSystem &SpaceSystem, csp::common::LogSystem &LogSystem)
MultiplayerSystem()
~MultiplayerSystem()
void GetScopesBySpace(const csp::common::String &SpaceId, ScopesResultCallback Callback)

Gets all scopes associated with the given space id.

Note: These functions are currently not exported, as they are only used for testing, as we haven’t fully implemented scopes within csp.

Parameters
Pre

Must already have entered the space of the SpaceId parameter. A CSP error will be sent to the LogSystem if this condition is not met, with a EResultCode::Failed response.

void UpdateScopeById(const csp::common::String &ScopeId, const csp::systems::Scope &Scope, ScopeResultCallback Callback)

Updates Data on a scope.

Note: These functions are currently not exported, as they are only used for testing, as we haven’t fully implemented scopes within csp.

Parameters
void GetScopeLeader(const csp::common::String &ScopeId, ScopeLeaderResultCallback Callback)

Gets details about a scope leader.

Note: These functions are currently not exported, as they are only used for testing, as we haven’t fully implemented scopes within csp.

Parameters
Pre

“ManagedLeaderElection” should be set to true on the scope, otherwise this function will fail with a EResultCode::Failed response.

Pre

Must already have entered the space of the SpaceId parameter.

void __PerformLeaderElectionInScope(const csp::common::String &ScopeId, const csp::common::Optional<csp::common::Array<csp::common::String>> &UserIdsToExclude, NullResultCallback Callback)

Starts leader election for the given scope.

Note: These functions are currently not exported, as they are only used for testing, as we haven’t fully implemented scopes within csp. This should not need to be called outside of testing, as leader election is done automatically.

Parameters
Pre

“ManagedLeaderElection” should be set to true on the scope, otherwise this function will fail with a EResultCode::Failed response.

Pre

Must already have entered the space of the SpaceId parameter.