CrowdControl
Inherits IBehavior
Public Member Functions
void
bool
Checks if the current JWT token is valid for authentication with the Crowd Control service. True if the token is valid, false otherwise.
Task
Task
void
Opens the connection to the Crowd Control service.
void
Closes the connection to the Crowd Control service.
Task
Pings the Crowd Control service to check connectivity.
void
Documentation inherited from IBehavior.LoadContent.
void
Documentation inherited from IBehavior.UnloadContent.
void
Documentation inherited from IBehavior.Draw.
void
Documentation inherited from IBehavior.Update.
Task
Documentation inherited from ClientSocket.GetAuthCode.
string?
Documentation inherited from ClientSocket.GetInteractLink.
Task
Documentation inherited from ClientSocket.LoadCustomEffects.
bool
Documentation inherited from IEffectLoader.CloneEffect.
void
Documentation inherited from ClientSocket.Respond(EffectRequest, EffectStatus, string?).
void
Documentation inherited from ClientSocket.Respond(EffectRequest, EffectStatus, StandardErrors?, string?).
void
Documentation inherited from ClientSocket.Respond(EffectRequest, EffectStatus, SITimeSpan?, string?).
void
Documentation inherited from ClientSocket.Respond(EffectRequest, EffectStatus, SITimeSpan?, StandardErrors?, string?).
void
Documentation inherited from ClientSocket.MetadataChanged(string, IDictionary{string, object}).
void
Task
Shows the specified effects on the menu. True if the message was sent successfully, false otherwise.
Task
Documentation inherited from ShowEffects(string[]).
Task
Shows all effects on the menu. True if the message was sent successfully, false otherwise.
Task
Hides the specified effects on the menu. True if the message was sent successfully, false otherwise.
Task
Documentation inherited from HideEffects(string[]).
Task
Hides all effects on the menu. True if the message was sent successfully, false otherwise.
Task
Makes the specified effects selectable on the menu. True if the message was sent successfully, false otherwise.
Task
Documentation inherited from EnableEffects(string[]).
Task
Makes all effects selectable on the menu. True if the message was sent successfully, false otherwise.
Task
Makes the specified effects unselectable on the menu. True if the message was sent successfully, false otherwise.
Task
Documentation inherited from DisableEffects(string[]).
Task
Makes all effects unselectable on the menu. True if the message was sent successfully, false otherwise.
Public Static Functions
bool
Checks if the provided JWT token is valid for authentication with the Crowd Control service. True if the token is valid, false otherwise.
Private Functions
void
void
Handles an incoming effect request from the Crowd Control service. Responds with an appropriate status message if the effect cannot be handled.
Protected Functions
void
Documentation inherited from IDisposable.Dispose.
Internal Attributes
ClientSocket
ClientSocket
The client socket used to communicate with the Crowd Control service.
Properties
bool
ContentLoaded
[get, set]
Documentation inherited from IBehavior.ContentLoaded.
string
GameID
[get, ]
The game identifier used when connecting to the Crowd Control service.
string
ApplicationID
[get, ]
The application identifier used for authentication with the Crowd Control service.
bool
Connected
[get, ]
Gets whether the client socket is currently connected to the Crowd Control service.
IEffectLoader
EffectLoader
[get, ]
The effect loader used to manage and load effects.
IMetadataLoader
MetadataLoader
[get, ]
The metadata loader used to manage and load metadata.
Scheduler
Scheduler
[get, ]
The scheduler used to manage timed effects.
EffectType
AllowedTypes
[get, set]
Types of effects that this client will accept from the Crowd Control service. Effects of other types will be silently discarded. Do not change this value without consulting Crowd Control support.
IGameStateManager
GameStateManager
[get, ]
The game state manager used to query and manipulate game state.
bool
IsActiveSession
[get, ]
Gets whether this instance has an active session.
bool
IsDisposed
[get, set]
Gets whether this instance has been disposed.
TaskScheduler
m_taskScheduler
[get, set]
TaskFactory
TaskFactory
[get, ]
bool
AutoReconnect
[get, set]
Whether to automatically reconnect to Crowd Control when the connection is lost while a session is active.
Events
Action<EffectRequest>?
EffectRequestReceived
Raised when an effect request is received from the Crowd Control API.
Action<EffectRequest, Common.EffectResponse>?
EffectResponseSent
Raised when an effect request response is sent to the Crowd Control API.
Action<EffectReport>?
EffectReportSent
Raised when an effect class report is sent to the Crowd Control API.
Action?
SessionReady
Raised when the Crowd Control session is ready.
Action?
SessionEnded
Raised when the Crowd Control session has ended.
Action<string>?
JwtTokenReceived
Raised when a JWT token is received from the Crowd Control API.
Action?
Disposed
Raised when this instance is disposed.
Action<ApplicationAuthCode>
AuthCodeReceived
Raised when an application auth code is received from the Crowd Control API.
Action<ApplicationAuthCodeRedeemed>
AuthCodeRedeemedReceived
Raised when an application auth code is redeemed by the Crowd Control API.
Action<ApplicationAuthCodeError>
AuthCodeErrorReceived
Raised when an error occurs during application auth code retrieval or redemption.
