Skip to content

GameInstance

Summary

MembersDescriptions
enum ERH_ServerBootstrapModeAn enum for the handled bootstrapping modes.
enum ERH_ServerBootstrapFlowStepAn enum for the steps in the bootstrapping flow.
class URH_BootstrappingSettingsAn settings object that contains the settings for the bootstrapping flow.
class URH_GameInstanceServerBootstrapperServer Bootstrapper for the Game Instance.
class URH_GameInstanceClientBootstrapperClient Boostrapper for the Game Instance.
class URH_GameInstanceSubsystemSubsystem for the Game Instance.
struct FRH_BootstrappingResultAn result object that contains the accumulated results for the bootstrapping flow.
struct FRH_ActiveSessionStatePlayerContext

Members

enum ERH_ServerBootstrapMode

ValuesDescriptions
GameHostProviderWe are in an unknown mode which cannot be handled internally to this subsystem, instead rely on the GameHostProvider to handle the mode
DisabledBootstrapping is disabled entirely
LoginOnlyBootstrapping is restricted to login only
AutoCreateSpecial type of GameHostProvider mode, which has a fallback provider if needed and will allocate itself a session

An enum for the handled bootstrapping modes.

enum ERH_ServerBootstrapFlowStep

ValuesDescriptions
UnstartedBootstrapping has not been started
FailedBootstrapping has failed
LoggingInBootstrapping is logging into the RallyHere API
RecyclingBootstrapping is doing an internal recycle of the server state (note: initial boot uses this state to initialize as well)
RegistrationBootstrapping is registering the server with the provider
WaitingForSessionBootstrapping has received an allocation and is attempting to lookup the corresponding session
SyncingToSessionBootstrapping has retrieved the session, validated it, and is attempting to synchronize the GameInstanceSessionSubsystem to that session
CompleteBootstrapping has completed (though may be recycled in the future)
CleanupBootstrapping is cleaning up, and may potentially recycle

An enum for the steps in the bootstrapping flow.

class URH_BootstrappingSettings

class URH_BootstrappingSettings
: public UObject

An settings object that contains the settings for the bootstrapping flow.

Summary

MembersDescriptions
public float PollIntervalFinalizerThe poll interval for the finalizer that looks up the session based on the allocation info from the provider.
public int32 PollLogIntervalFinalizerHow often to log progress on the finalizer poll (number of polls between logs)
public int32 MaxPollCountFinalizerMaximum number of polls on the finalizer before it is determined to be a failure.
public URH_BootstrappingSettings(const FObjectInitializer & ObjectInitializer)Default constructor.

Members

public float PollIntervalFinalizer

The poll interval for the finalizer that looks up the session based on the allocation info from the provider.

public int32 PollLogIntervalFinalizer

How often to log progress on the finalizer poll (number of polls between logs)

public int32 MaxPollCountFinalizer

Maximum number of polls on the finalizer before it is determined to be a failure.

public URH_BootstrappingSettings(const FObjectInitializer & ObjectInitializer)

Default constructor.

class URH_GameInstanceServerBootstrapper

class URH_GameInstanceServerBootstrapper
: public URH_GameInstanceSubsystemPlugin
: public IRH_SessionOwnerInterface
: public FTickableGameObject

Server Bootstrapper for the Game Instance.

Summary

MembersDescriptions
public FRH_OnBootstrapStepChangedDynamicDelegate BLUEPRINT_OnBootstrapStepChangedBlueprint delegate for when bootstrap step changes.
public FRH_OnBootstrapStepChangedDelegate OnBootstrapStepChangedDelegate for when bootstrap step changes.
public FRH_GameHostProviderStatsRequested OnGameHostProviderStatsRequestedcallback triggered to request stats if default implementation is not sufficient
public URH_GameInstanceServerBootstrapper()
public virtual void Initialize()Initialize the bootstrapper.
public virtual void Deinitialize()Deinitialize the bootstrapper.
public inline FORCEINLINE ERH_ServerBootstrapFlowStep GetBootstrapStep() constGet the current bootstrapping step.
public inline FORCEINLINE ERH_ServerBootstrapMode GetBootstrapMode() constGet the current bootstrapping mode.
public bool DetermineJoinParameters(FString & PublicConnStr,FString & PrivateConnStr)Determines the join parameters to be used for a session that was bootstrapped.
public virtual void OnGameHostProviderStats(FRH_GameHostProviderStats & Stats)bound callback triggered to provide stats to the game host provider
public virtual void Tick(float DeltaTime)Tick function.
public virtual bool IsTickable() constWhether or not to tick this object.
public virtual TStatId GetStatId() constWhat stat id to use to report for the tick.
public inline virtual FAuthContextPtr GetAuthContext() constProvides the auth context this bootstrapper owns.
public inline virtual TSharedPtr< class IAnalyticsProvider > GetAnalyticsProvider() constGet the Analytics Provider.
public inline virtual URH_OnlineSession*GetSession() constGet the current bootstrapping mode.
public inline virtual FAuthContextPtr GetSessionAuthContext() constGets the auth context to use for API calls for the session owner.
public virtual void ImportAPISession(const FRH_APISessionWithETag & Session)Imports a session object from the API into the owner (ex: from polling).
public virtual void ImportAPITemplate(const FRHAPI_SessionTemplate & Template)Imports the template into the owner’s template list (ex: from polling).
public virtual void ReconcileAPISessions(const TArray< FString > & SessionIds,const TOptional< FString > & ETag)Updates the list of sessions to only those that are active.
public virtual void ReconcileAPITemplates(const TArray< FString > & InTemplates,const TOptional< FString > & ETag)Updates the list of session templates to those that are active.
public virtual class URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() constGets the PlayerInfo Subsystem.
public virtual IOnlineSubsystem * GetOSS() constGets the Online Subsystem to use for OSS calls.
public virtual FUniqueNetIdWrapper GetOSSUniqueId() constGets the Online Subsystem Unique Id to use for OSS calls.
public virtual FPlatformUserId GetOSSPlatformUserId() constGets the Online Subsystem PlatformUserId to use for OSS calls (equivalent to controller index)
public inline virtual TOptional< FString > GetETagForAllTemplatesPoll() constGets the etag to use for a “Get all Templates” type query.
public inline virtual TOptional< FString > GetETagForAllSessionsPoll() constGets the etag to use for a “Get all Sessions” type query.
public inline virtual TArray< URH_SessionView* >GetAllSessionsForPolling() constUsed to get all sessions, primarily for get all sessions polling where etag matches.
public virtual URH_SessionView*GetSessionById(const FString & SessionId) constGets a session by its id.
public virtual void RemoveSessionById(const FString & SessionId)Removes a cached session for the local player, this does NOT try to leave it.
public virtual bool GetTemplate(const FString & Type,FRHAPI_SessionTemplate & Template) constGets a session template by type.
public inline virtual URH_PlatformSessionSyncer*GetPlatformSyncerByRHSessionId(const FString & SessionId) constGets the platform synchronization object using the rally here session id.
public inline virtual URH_PlatformSessionSyncer*GetPlatformSyncerByPlatformSessionId(const FUniqueNetIdRepl & PlatformSessionId) constGets the platform synchronization object using the platform session id.
public inline const FRH_BootstrappingResult&GetBootstrappingResult() constGets the bootstrapping result from this bootstrapper.
public inline virtual TOptional< FString > GetBoundAllocationId() constGets the allocation id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.
public inline virtual TOptional< FString > GetBoundSessionId() constGets the session id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.
public inline virtual TOptional< FString > GetBoundInstanceId() constGets the instance id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.
public virtual bool CanAutoUploadServerFiles() constGets the directory to use for uploading files for this bootstrapper.
public virtual FRH_RemoteFileApiDirectory GetAutoUploadDirectory(bool bDeveloperFile) constGets the directory to use for uploading files for this bootstrapper.
public virtual void ConditionalAutoUploadLogFile() constCapture and upload log file based on settings.
public virtual void ConditionalAutoUploadTraceFile(const FString & TraceFile) constCapture and upload trace file based on settings.
protected ERH_ServerBootstrapMode BootstrapModeBootstrap Mode being used
protected ERH_ServerBootstrapFlowStep BootstrapStepCurrent Bootstrap Step
protected int32 CurrentRecycleCountThe current recycle count (note that the initial boot is considered the first recycle, so this is effectively 1-based)
protected FAuthContextPtr AuthContextThe auth context for this bootstrapper
protected TSharedPtr< class IAnalyticsProvider > AnalyticsProviderThe analytics provider for this bootstrapper
protected TOptional< FDateTime > AnalyticsStartTimeThe start time of the AnalyticsProvider
protected TUniquePtr< IRH_GameHostProviderInterface > GameHostProviderThe game host provider for this bootstrapper
protected FRH_BootstrappingResult BootstrappingResultThe current bootstrapping result
protected TMap< FString, FRHAPI_SessionTemplate>TemplatesSession templates to use to iniailize the session
protected TOptional< FString > AllTemplatesETagETag for the template list
protected URH_OnlineSession*RHSessionThe current session we are using
protected FString DefaultAutoCreateSessionTypeThe default type of session to create when using AutoCreate bootstrapping mode
protected ERH_ServerBootstrapMode DefaultBootstrapModeThe default type of bootstrapping mode (only supports Disabled and LoginOnly, as other session types require commandline injection)
protected int32 MaxRecycleCountThe maximum number of times to recycle this bootstrapper (if less than one, implies 1), checked during cleanup
protected bool bMultiSessionServerModeDisables some checks that will cause the process to spin down, for use in cases where multiple game instances are running within a single process
protected bool bReplaceSIGTERMHandlerWhether to intercept SIGTERM and prevent passing it to engine handler(which will exit immediately)
protected virtual void ApplicationTerminationNotify()Callback binding for the default engine SIGTERM / CTRL - C(Windows) handlers - these are indicating an IMMEDIATE shutdown - will defer to game thread if needed.
protected virtual void HandleAppTerminatedGameThread()Callback binding for the default engine SIGTERM / CTRL - C(Windows) handlers - these are indicating an IMMEDIATE shutdown - runs in the game thread.
protected virtual void BestEffortLeaveSession()Fallback routine that does its best to leave the session we have loaded.
protected virtual void UpdateBootstrapStep(ERH_ServerBootstrapFlowStep NewStep)Updates the current bootstrapping step, and handles step change logic.
protected virtual void OnBootstrappingFailed(const FString & FailureReason)Bootstrapping Flow [Failed] - trigger bootstrapping failure and handles failure logic.
protected virtual void OnBootstrappingComplete()Bootstrapping Flow [Complete] - trigger bootstrapping complete and handles completion logic. Note that recycling may start a new bootstrapping flow.
protected virtual void BeginServerLogin()Bootstrapping Flow [LoggingIn] - begin the login process to the RallyHere API.
protected virtual void OnServerLoginComplete(bool bSuccess,const FRH_ErrorInfo & ErrorInfo)Bootstrapping Flow [Login] - completion callback for RallyHere API login.
protected virtual void Recycle()Bootstrapping Flow [Recycle] - start a new recycle loop.
protected virtual void BeginRegistration()Bootstrapping Flow [Registration][Allocation][AutoCreate] - start the process of registering with the game host provider.
protected virtual void BeginConnecting()Bootstrapping Flow [Registration][Allocation][AutoCreate] - begin connecting to the provider.
protected virtual void OnConnectComplete(bool bSuccess)Bootstrapping Flow [Registration][Allocation][AutoCreate] - completion callback for connecting to the provider.
protected virtual void BeginRegister()Bootstrapping Flow [Registration][Allocation] - register with provider and wait for an allocation.
protected virtual void OnRegisterComplete(bool bSucess)Bootstrapping Flow [Registration][Allocation] - completion callback for registering with the provider.
protected virtual void OnAllocationComplete(ERH_AllocationStatus Status,const FRH_GameHostAllocationInfo & AllocationInfo)Bootstrapping Flow [Registration][Allocation] - completion callback for allocation being ready.
protected virtual void BeginReservation()Bootstrapping Flow [Registration][AutoCreate] - begin a reservation so that the provider can know about this server.
protected virtual void OnReservationComplete(bool bSuccess)Bootstrapping Flow [Registration][AutoCreate] - completion callback for reservation creation.
protected virtual void BeginSelfAllocate()Bootstrapping Flow [Registration][AutoCreate] - inform the provider that this server is self-allocated.
protected virtual void OnSelfAllocateComplete(bool bSuccess)Bootstrapping Flow [Registration][AutoCreate] - completion callback for self allocation.
protected virtual void OnRegistrationFinalizerComplete(bool bSuccess,const FRH_BootstrappingResult & Result)Bootstrapping Flow [WaitingForSession] - callback for when registration process has completed and produced a bootstrapping result. Checks the result and then checks for an instance. Either creates and instance, or forwards on to OnSessionInstanceCreationCompleted()
protected virtual void OnSessionInstanceCreationCompleted(bool bSuccess,URH_SessionView* CreatedRHSession,constFRH_ErrorInfo & ErrorInfo)Bootstrapping Flow [WaitingForSession] - callback for when registration process has completed and produced a bootstrapping result.
protected virtual void SyncToSession()Bootstrapping Flow [SyncingToSession] - begin the process of synchronizing the session state into RH_GameInstanceSessionSubsystem.
protected virtual void OnSyncToSessionComplete(URH_JoinedSession * Session,bool bSuccess,const FString & Error)Bootstrapping Flow [SyncingToSession] - completiong callback for session sync.
protected virtual void OnActiveSessionChanged(URH_JoinedSession * OldSession,URH_JoinedSession * NewSession)Notification callback that the session manager has had its active session changed.
protected virtual void OnSessionUpdated(URH_SessionView * Session)Notification callback that the session we have synced to was updated.
protected virtual void OnSessionNotFound(URH_SessionView * Session)Notification callback that the session we have synced to was not found.
protected virtual void CleanupAfterLogout()Utility function to clean up state after a logout.
protected virtual void CleanupAfterSessionUnsynced()Utility function to clean up state after an the session became unsynced from the manager.
protected virtual void CleanupAfterInstanceRemoval()Utility function to clean up state after an instance removal (or something else causing session data to become invalid). Handles unsyncing session state, etc.
protected virtual void OnCleanupSessionSyncComplete(URH_JoinedSession * Session,bool bSuccess,const FString & Error)Completion callback for session and instance cleanup, triggers Cleanup()
protected virtual void Cleanup()Cleans up state, and prepares for a recycle if needed. Assumes session has already been unsynced.
protected virtual bool ShouldRecycleAfterCleanup() constGets whether we should recycle the state after cleanup.
protected virtual void ConditionalRecycle()Conditionally triggers a recycle if we are allowed to recycle, otherwise shut down.
protected virtual void OnLoggedOut(bool bRefreshTokenExpired)Callback for when the server is logged out (effectively, authorization to the API is lost, and was not automatically recovered)
protected virtual void OnRefreshTokenExpired(FSimpleDelegate CompleteCallback)Callback for when a refresh token expires.

Members

public FRH_OnBootstrapStepChangedDynamicDelegate BLUEPRINT_OnBootstrapStepChanged

Blueprint delegate for when bootstrap step changes.

public FRH_OnBootstrapStepChangedDelegate OnBootstrapStepChanged

Delegate for when bootstrap step changes.

public FRH_GameHostProviderStatsRequested OnGameHostProviderStatsRequested

callback triggered to request stats if default implementation is not sufficient

public URH_GameInstanceServerBootstrapper()

public virtual void Initialize()

Initialize the bootstrapper.

public virtual void Deinitialize()

Deinitialize the bootstrapper.

public inline FORCEINLINE ERH_ServerBootstrapFlowStep GetBootstrapStep() const

Get the current bootstrapping step.

public inline FORCEINLINE ERH_ServerBootstrapMode GetBootstrapMode() const

Get the current bootstrapping mode.

public bool DetermineJoinParameters(FString & PublicConnStr,FString & PrivateConnStr)

Determines the join parameters to be used for a session that was bootstrapped.

Parameters

  • PublicConnStr The public connection string to use

  • PrivateConnStr The private connection string to use

Returns

Whether or not the join parameters were successfully determined from the allocation info

public virtual void OnGameHostProviderStats(FRH_GameHostProviderStats & Stats)

bound callback triggered to provide stats to the game host provider

public virtual void Tick(float DeltaTime)

Tick function.

Parameters

  • DeltaTime The time since the last tick

public virtual bool IsTickable() const

Whether or not to tick this object.

public virtual TStatId GetStatId() const

What stat id to use to report for the tick.

public inline virtual FAuthContextPtr GetAuthContext() const

Provides the auth context this bootstrapper owns.

public inline virtual TSharedPtr< class IAnalyticsProvider > GetAnalyticsProvider() const

Get the Analytics Provider.

public inline virtual URH_OnlineSession*GetSession() const

Get the current bootstrapping mode.

public inline virtual FAuthContextPtr GetSessionAuthContext() const

Gets the auth context to use for API calls for the session owner.

public virtual void ImportAPISession(const FRH_APISessionWithETag & Session)

Imports a session object from the API into the owner (ex: from polling).

Parameters

  • Session The Session to import.

public virtual void ImportAPITemplate(const FRHAPI_SessionTemplate & Template)

Imports the template into the owner’s template list (ex: from polling).

Parameters

  • TemplateWrapper The Template to import.

public virtual void ReconcileAPISessions(const TArray< FString > & SessionIds,const TOptional< FString > & ETag)

Updates the list of sessions to only those that are active.

Parameters

  • SessionIds The list of sessions that we are reconciling against.

  • ETag The ETag to use for the update.

public virtual void ReconcileAPITemplates(const TArray< FString > & InTemplates,const TOptional< FString > & ETag)

Updates the list of session templates to those that are active.

Parameters

  • InTemplates The list of templates that we are reconciling against.

  • ETag The ETag to use for the update.

public virtual class URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() const

Gets the PlayerInfo Subsystem.

public virtual IOnlineSubsystem * GetOSS() const

Gets the Online Subsystem to use for OSS calls.

public virtual FUniqueNetIdWrapper GetOSSUniqueId() const

Gets the Online Subsystem Unique Id to use for OSS calls.

public virtual FPlatformUserId GetOSSPlatformUserId() const

Gets the Online Subsystem PlatformUserId to use for OSS calls (equivalent to controller index)

public inline virtual TOptional< FString > GetETagForAllTemplatesPoll() const

Gets the etag to use for a “Get all Templates” type query.

public inline virtual TOptional< FString > GetETagForAllSessionsPoll() const

Gets the etag to use for a “Get all Sessions” type query.

public inline virtual TArray< URH_SessionView* >GetAllSessionsForPolling() const

Used to get all sessions, primarily for get all sessions polling where etag matches.

public virtual URH_SessionView*GetSessionById(const FString & SessionId) const

Gets a session by its id.

Parameters

  • SessionId The Session Id to get.

Returns

The Session with the given Id.

public virtual void RemoveSessionById(const FString & SessionId)

Removes a cached session for the local player, this does NOT try to leave it.

Parameters

  • SessionId The Session Id to remove.

public virtual bool GetTemplate(const FString & Type,FRHAPI_SessionTemplate & Template) const

Gets a session template by type.

Parameters

  • Type the Type of template to get.

  • Template The session template being retrieved.

Returns

If true, the template was found.

public inline virtual URH_PlatformSessionSyncer*GetPlatformSyncerByRHSessionId(const FString & SessionId) const

Gets the platform synchronization object using the rally here session id.

public inline virtual URH_PlatformSessionSyncer*GetPlatformSyncerByPlatformSessionId(const FUniqueNetIdRepl & PlatformSessionId) const

Gets the platform synchronization object using the platform session id.

public inline const FRH_BootstrappingResult&GetBootstrappingResult() const

Gets the bootstrapping result from this bootstrapper.

public inline virtual TOptional< FString > GetBoundAllocationId() const

Gets the allocation id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.

public inline virtual TOptional< FString > GetBoundSessionId() const

Gets the session id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.

public inline virtual TOptional< FString > GetBoundInstanceId() const

Gets the instance id this session owner is bound to, if any. Needed for some specific calls to ensure they are operating on the proper object regardless of our current session view.

public virtual bool CanAutoUploadServerFiles() const

Gets the directory to use for uploading files for this bootstrapper.

public virtual FRH_RemoteFileApiDirectory GetAutoUploadDirectory(bool bDeveloperFile) const

Gets the directory to use for uploading files for this bootstrapper.

public virtual void ConditionalAutoUploadLogFile() const

Capture and upload log file based on settings.

public virtual void ConditionalAutoUploadTraceFile(const FString & TraceFile) const

Capture and upload trace file based on settings.

protected ERH_ServerBootstrapMode BootstrapMode

Bootstrap Mode being used

protected ERH_ServerBootstrapFlowStep BootstrapStep

Current Bootstrap Step

protected int32 CurrentRecycleCount

The current recycle count (note that the initial boot is considered the first recycle, so this is effectively 1-based)

protected FAuthContextPtr AuthContext

The auth context for this bootstrapper

protected TSharedPtr< class IAnalyticsProvider > AnalyticsProvider

The analytics provider for this bootstrapper

protected TOptional< FDateTime > AnalyticsStartTime

The start time of the AnalyticsProvider

protected TUniquePtr< IRH_GameHostProviderInterface > GameHostProvider

The game host provider for this bootstrapper

protected FRH_BootstrappingResult BootstrappingResult

The current bootstrapping result

protected TMap< FString, FRHAPI_SessionTemplate>Templates

Session templates to use to iniailize the session

protected TOptional< FString > AllTemplatesETag

ETag for the template list

protected URH_OnlineSession*RHSession

The current session we are using

protected FString DefaultAutoCreateSessionType

The default type of session to create when using AutoCreate bootstrapping mode

protected ERH_ServerBootstrapMode DefaultBootstrapMode

The default type of bootstrapping mode (only supports Disabled and LoginOnly, as other session types require commandline injection)

protected int32 MaxRecycleCount

The maximum number of times to recycle this bootstrapper (if less than one, implies 1), checked during cleanup

protected bool bMultiSessionServerMode

Disables some checks that will cause the process to spin down, for use in cases where multiple game instances are running within a single process

protected bool bReplaceSIGTERMHandler

Whether to intercept SIGTERM and prevent passing it to engine handler(which will exit immediately)

protected virtual void ApplicationTerminationNotify()

Callback binding for the default engine SIGTERM / CTRL - C(Windows) handlers - these are indicating an IMMEDIATE shutdown - will defer to game thread if needed.

protected virtual void HandleAppTerminatedGameThread()

Callback binding for the default engine SIGTERM / CTRL - C(Windows) handlers - these are indicating an IMMEDIATE shutdown - runs in the game thread.

protected virtual void BestEffortLeaveSession()

Fallback routine that does its best to leave the session we have loaded.

protected virtual void UpdateBootstrapStep(ERH_ServerBootstrapFlowStep NewStep)

Updates the current bootstrapping step, and handles step change logic.

Parameters

  • NewStep The new step to transition to

protected virtual void OnBootstrappingFailed(const FString & FailureReason)

Bootstrapping Flow [Failed] - trigger bootstrapping failure and handles failure logic.

protected virtual void OnBootstrappingComplete()

Bootstrapping Flow [Complete] - trigger bootstrapping complete and handles completion logic. Note that recycling may start a new bootstrapping flow.

protected virtual void BeginServerLogin()

Bootstrapping Flow [LoggingIn] - begin the login process to the RallyHere API.

protected virtual void OnServerLoginComplete(bool bSuccess,const FRH_ErrorInfo & ErrorInfo)

Bootstrapping Flow [Login] - completion callback for RallyHere API login.

Parameters

  • bSuccess Whether or not the login was successful

protected virtual void Recycle()

Bootstrapping Flow [Recycle] - start a new recycle loop.

protected virtual void BeginRegistration()

Bootstrapping Flow [Registration][Allocation][AutoCreate] - start the process of registering with the game host provider.

protected virtual void BeginConnecting()

Bootstrapping Flow [Registration][Allocation][AutoCreate] - begin connecting to the provider.

protected virtual void OnConnectComplete(bool bSuccess)

Bootstrapping Flow [Registration][Allocation][AutoCreate] - completion callback for connecting to the provider.

Parameters

  • bSuccess Whether or not the connection was successful

protected virtual void BeginRegister()

Bootstrapping Flow [Registration][Allocation] - register with provider and wait for an allocation.

protected virtual void OnRegisterComplete(bool bSucess)

Bootstrapping Flow [Registration][Allocation] - completion callback for registering with the provider.

Parameters

  • bSuccess Whether or not the connection was successful

protected virtual void OnAllocationComplete(ERH_AllocationStatus Status,const FRH_GameHostAllocationInfo & AllocationInfo)

Bootstrapping Flow [Registration][Allocation] - completion callback for allocation being ready.

Parameters

  • Status Whether or not the allocation was successful or had an error

  • AllocationInfo The allocation info that was produced

protected virtual void BeginReservation()

Bootstrapping Flow [Registration][AutoCreate] - begin a reservation so that the provider can know about this server.

protected virtual void OnReservationComplete(bool bSuccess)

Bootstrapping Flow [Registration][AutoCreate] - completion callback for reservation creation.

Parameters

  • bSuccess Whether or not the reservation was successful

protected virtual void BeginSelfAllocate()

Bootstrapping Flow [Registration][AutoCreate] - inform the provider that this server is self-allocated.

protected virtual void OnSelfAllocateComplete(bool bSuccess)

Bootstrapping Flow [Registration][AutoCreate] - completion callback for self allocation.

Parameters

  • bSuccess Whether or not the self allocation was successful

protected virtual void OnRegistrationFinalizerComplete(bool bSuccess,const FRH_BootstrappingResult & Result)

Bootstrapping Flow [WaitingForSession] - callback for when registration process has completed and produced a bootstrapping result. Checks the result and then checks for an instance. Either creates and instance, or forwards on to OnSessionInstanceCreationCompleted()

Parameters

  • bSuccess Whether or not the registration was successful

  • Result The bootstrapping result that was produced

protected virtual void OnSessionInstanceCreationCompleted(bool bSuccess,URH_SessionView* CreatedRHSession,constFRH_ErrorInfo & ErrorInfo)

Bootstrapping Flow [WaitingForSession] - callback for when registration process has completed and produced a bootstrapping result.

Parameters

  • bSuccess Whether or not the instance was successfully created

  • CreatedRHSession The session that was created with an instance

  • ErrorInfo Error information about the instance creation

protected virtual void SyncToSession()

Bootstrapping Flow [SyncingToSession] - begin the process of synchronizing the session state into RH_GameInstanceSessionSubsystem.

protected virtual void OnSyncToSessionComplete(URH_JoinedSession * Session,bool bSuccess,const FString & Error)

Bootstrapping Flow [SyncingToSession] - completiong callback for session sync.

Parameters

  • bSuccess Whether or not the session sync was successful

protected virtual void OnActiveSessionChanged(URH_JoinedSession * OldSession,URH_JoinedSession * NewSession)

Notification callback that the session manager has had its active session changed.

Parameters

  • OldSession The old session that was active

  • NewSession The new session that is active

protected virtual void OnSessionUpdated(URH_SessionView * Session)

Notification callback that the session we have synced to was updated.

Parameters

  • Session The updated session

protected virtual void OnSessionNotFound(URH_SessionView * Session)

Notification callback that the session we have synced to was not found.

Parameters

  • Session The session that was not found

protected virtual void CleanupAfterLogout()

Utility function to clean up state after a logout.

protected virtual void CleanupAfterSessionUnsynced()

Utility function to clean up state after an the session became unsynced from the manager.

protected virtual void CleanupAfterInstanceRemoval()

Utility function to clean up state after an instance removal (or something else causing session data to become invalid). Handles unsyncing session state, etc.

protected virtual void OnCleanupSessionSyncComplete(URH_JoinedSession * Session,bool bSuccess,const FString & Error)

Completion callback for session and instance cleanup, triggers Cleanup()

protected virtual void Cleanup()

Cleans up state, and prepares for a recycle if needed. Assumes session has already been unsynced.

protected virtual bool ShouldRecycleAfterCleanup() const

Gets whether we should recycle the state after cleanup.

protected virtual void ConditionalRecycle()

Conditionally triggers a recycle if we are allowed to recycle, otherwise shut down.

protected virtual void OnLoggedOut(bool bRefreshTokenExpired)

Callback for when the server is logged out (effectively, authorization to the API is lost, and was not automatically recovered)

protected virtual void OnRefreshTokenExpired(FSimpleDelegate CompleteCallback)

Callback for when a refresh token expires.

class URH_GameInstanceClientBootstrapper

class URH_GameInstanceClientBootstrapper
: public URH_GameInstanceSubsystemPlugin

Client Boostrapper for the Game Instance.

Summary

MembersDescriptions
public virtual void Initialize()Initialize the bootstrapper.
public virtual void Deinitialize()Deinitialize the bootstrapper.
public virtual void CreateOfflineSession()Utility function to create an offline session

Members

public virtual void Initialize()

Initialize the bootstrapper.

public virtual void Deinitialize()

Deinitialize the bootstrapper.

public virtual void CreateOfflineSession()

Utility function to create an offline session

class URH_GameInstanceSubsystem

class URH_GameInstanceSubsystem
: public UGameInstanceSubsystem

Subsystem for the Game Instance.

Summary

MembersDescriptions
public virtual bool ShouldCreateSubsystem(UObject * Outer) constGets if the subsystem is enabled and should be created.
public virtual void Initialize(FSubsystemCollectionBase & Collection)Initialize the subsystem.
public virtual void Deinitialize()Safely tears down the subsystem.
public inline virtual void SetAuthContext(FAuthContextPtr InAuthContext)Sets the Auth Context for the subsystem.
public inline FORCEINLINE FAuthContextPtr GetAuthContext() constGets the subsystems designated auth context.
public inline virtual void SetAnalyticsProvider(TSharedPtr< class IAnalyticsProvider > InAnalyticsProvider)Sets the analytics provider for the subsystem.
public inline FORCEINLINE TSharedPtr< class IAnalyticsProvider > GetAnalyticsProvider() constGets the instance’s analytics provider to use.
public inline FORCEINLINE URH_GameInstanceSessionSubsystem*GetSessionSubsystem() constGets the session subsystem on the instance.
public inline FORCEINLINE URH_SessionBrowserCache*GetSessionSearchCache() constGets the session search cache on the instance.
public inline FORCEINLINE URH_MatchmakingBrowserCache*GetMatchmakingCache() constGets the matchmaking cache on the instance.
public inline FORCEINLINE URH_GameInstanceServerBootstrapper*GetServerBootstrapper() constGets the server bootstrapper on the instance.
public inline FORCEINLINE URH_GameInstanceClientBootstrapper*GetClientBootstrapper() constGets the client boostrapper on the instance.
public inline FORCEINLINE URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() constGets the player info subsystem on the instance.
public inline FORCEINLINE URH_CatalogSubsystem*GetCatalogSubsystem() constGets the catalog subsystem on the instance.
public inline FORCEINLINE URH_ConfigSubsystem*GetConfigSubsystem() constGets the config subsystem on the instance.
public inline FORCEINLINE URH_SettingsSubsystem*GetSettingsSubsystem() constGets the settings subsystem on the instance.
public inline FORCEINLINE URH_MatchSubsystem*GetMatchSubsystem() constGets the match subsystem on the instance.
public inline FORCEINLINE URH_RemoteFileSubsystem*GetRemoteFileSubsystem() constGets the remote file subsystem on the instance.
public virtual void CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const RallyHereAPI::FDelegate_CustomEndpointSend & Delegate)Custom Endpoint wrapper (for custom endpoints that require authentication)
public virtual void CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const FRH_CustomEndpointDelegateBlock & Delegate)Custom Endpoint wrapper (for custom endpoints that require authentication)
public inline void BLUEPRINT_CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const FRH_CustomEndpointDynamicDelegate & Delegate)Custom Endpoint wrapper (for custom endpoints that require authentication)
protected FAuthContextPtr AuthContextAuth context used by the Game Instance Subsystem.
protected TSharedPtr< class IAnalyticsProvider > AnalyticsProviderAnalytics provider used by the Game Instance Subsystem.
protected TArray< URH_GameInstanceSubsystemPlugin* >SubsystemPluginsArray of plugins for the Game Instance Subsystem.
protected URH_GameInstanceSessionSubsystem*SessionSubsystemThe Session Subsystem.
protected URH_SessionBrowserCache*SessionSearchCacheThe Cache for seasion seaches.
protected URH_MatchmakingBrowserCache*MatchmakingCacheThe Cache to matchmaking.
protected URH_GameInstanceServerBootstrapper*ServerBootstrapperThe Game Instance Server Boostrapper.
protected URH_GameInstanceClientBootstrapper*ClientBootstrapperThe Game Instance Client Boostrapper.
protected URH_PlayerInfoSubsystem*PlayerInfoSubsystemThe Player Info Subsystem.
protected URH_CatalogSubsystem*CatalogSubsystemThe Catalog Subsystem.
protected URH_ConfigSubsystem*ConfigSubsystemThe Config Subsystem.
protected URH_SettingsSubsystem*SettingsSubsystemThe Settings Subsystem.
protected URH_MatchSubsystem*MatchSubsystemThe Match Subsystem.
protected URH_RemoteFileSubsystem*RemoteFileSubsystemThe File Subsystem.
protected bool bEnabledIf the Game Instance Subsystem is enabled.
protected bool bEnableSessionBrowserIf the Session Browser is enabled.
protected bool bEnableMatchmakingBrowserIf the Matchmaking Browser is enabled.
protected bool bEnableGameSessionsIf the Game Sessions are enabled.
protected bool bEnableServerBootstrapperIf the Game Instance Server Bootstrapper is enabled.
protected bool bEnableClientBootstrapperIf the Game Instance Client Bootstrapper is enabled.
protected template<>
inline UClassToUse * AddSubsystemPlugin(const FSoftClassPath & SubsystemClassPath)
Adds a plugin to the Game Instance Subsystem.
protected inline virtual void AddSubsystemPlugin(URH_GameInstanceSubsystemPlugin * InPlugin)Adds a plugin to the Game Instance Subsystem.
protected virtual void AppSuspendCallbackInGameThread()Handle application going into suspension (these involve the application losing focus).
protected virtual void AppResumeCallbackInGameThread()Handle application resuming from suspension (these involve the application losing focus).
protected virtual void AppDeactivatedCallbackInGameThread()Handle application deactivating (these involve the game shutting down and pausing (such as when a console is put to sleep)).
protected virtual void AppReactivatedCallbackInGameThread()Handle application reactivating (these involve the game shutting down and pausing (such as when a console is put to sleep)).

Members

public virtual bool ShouldCreateSubsystem(UObject * Outer) const

Gets if the subsystem is enabled and should be created.

public virtual void Initialize(FSubsystemCollectionBase & Collection)

Initialize the subsystem.

public virtual void Deinitialize()

Safely tears down the subsystem.

public inline virtual void SetAuthContext(FAuthContextPtr InAuthContext)

Sets the Auth Context for the subsystem.

Parameters

  • InAuthContext The Auth Context to set with.

public inline FORCEINLINE FAuthContextPtr GetAuthContext() const

Gets the subsystems designated auth context.

public inline virtual void SetAnalyticsProvider(TSharedPtr< class IAnalyticsProvider > InAnalyticsProvider)

Sets the analytics provider for the subsystem.

Parameters

  • InAnalyticsProvider The analytics provider to set with.

public inline FORCEINLINE TSharedPtr< class IAnalyticsProvider > GetAnalyticsProvider() const

Gets the instance’s analytics provider to use.

public inline FORCEINLINE URH_GameInstanceSessionSubsystem*GetSessionSubsystem() const

Gets the session subsystem on the instance.

public inline FORCEINLINE URH_SessionBrowserCache*GetSessionSearchCache() const

Gets the session search cache on the instance.

public inline FORCEINLINE URH_MatchmakingBrowserCache*GetMatchmakingCache() const

Gets the matchmaking cache on the instance.

public inline FORCEINLINE URH_GameInstanceServerBootstrapper*GetServerBootstrapper() const

Gets the server bootstrapper on the instance.

public inline FORCEINLINE URH_GameInstanceClientBootstrapper*GetClientBootstrapper() const

Gets the client boostrapper on the instance.

public inline FORCEINLINE URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() const

Gets the player info subsystem on the instance.

public inline FORCEINLINE URH_CatalogSubsystem*GetCatalogSubsystem() const

Gets the catalog subsystem on the instance.

public inline FORCEINLINE URH_ConfigSubsystem*GetConfigSubsystem() const

Gets the config subsystem on the instance.

public inline FORCEINLINE URH_SettingsSubsystem*GetSettingsSubsystem() const

Gets the settings subsystem on the instance.

public inline FORCEINLINE URH_MatchSubsystem*GetMatchSubsystem() const

Gets the match subsystem on the instance.

public inline FORCEINLINE URH_RemoteFileSubsystem*GetRemoteFileSubsystem() const

Gets the remote file subsystem on the instance.

public virtual void CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const RallyHereAPI::FDelegate_CustomEndpointSend & Delegate)

Custom Endpoint wrapper (for custom endpoints that require authentication)

Parameters

  • [FRH_CustomEndpointRequestWrapper](Common.md#structFRH__CustomEndpointRequestWrapper) Wrapper struct containing call information

  • Delegate The delegate to call when the call is complete (contains raw response)

public virtual void CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const FRH_CustomEndpointDelegateBlock & Delegate)

Custom Endpoint wrapper (for custom endpoints that require authentication)

Parameters

  • [FRH_CustomEndpointRequestWrapper](Common.md#structFRH__CustomEndpointRequestWrapper) Wrapper struct containing call information

  • Delegate The delegate to call when the call is complete

public inline void BLUEPRINT_CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const FRH_CustomEndpointDynamicDelegate & Delegate)

Custom Endpoint wrapper (for custom endpoints that require authentication)

Parameters

  • [FRH_CustomEndpointRequestWrapper](Common.md#structFRH__CustomEndpointRequestWrapper) Wrapper struct containing call information

  • Delegate The delegate to call when the call is complete

protected FAuthContextPtr AuthContext

Auth context used by the Game Instance Subsystem.

protected TSharedPtr< class IAnalyticsProvider > AnalyticsProvider

Analytics provider used by the Game Instance Subsystem.

protected TArray< URH_GameInstanceSubsystemPlugin* >SubsystemPlugins

Array of plugins for the Game Instance Subsystem.

protected URH_GameInstanceSessionSubsystem*SessionSubsystem

The Session Subsystem.

protected URH_SessionBrowserCache*SessionSearchCache

The Cache for seasion seaches.

protected URH_MatchmakingBrowserCache*MatchmakingCache

The Cache to matchmaking.

protected URH_GameInstanceServerBootstrapper*ServerBootstrapper

The Game Instance Server Boostrapper.

protected URH_GameInstanceClientBootstrapper*ClientBootstrapper

The Game Instance Client Boostrapper.

protected URH_PlayerInfoSubsystem*PlayerInfoSubsystem

The Player Info Subsystem.

protected URH_CatalogSubsystem*CatalogSubsystem

The Catalog Subsystem.

protected URH_ConfigSubsystem*ConfigSubsystem

The Config Subsystem.

protected URH_SettingsSubsystem*SettingsSubsystem

The Settings Subsystem.

protected URH_MatchSubsystem*MatchSubsystem

The Match Subsystem.

protected URH_RemoteFileSubsystem*RemoteFileSubsystem

The File Subsystem.

protected bool bEnabled

If the Game Instance Subsystem is enabled.

protected bool bEnableSessionBrowser

If the Session Browser is enabled.

protected bool bEnableMatchmakingBrowser

If the Matchmaking Browser is enabled.

protected bool bEnableGameSessions

If the Game Sessions are enabled.

protected bool bEnableServerBootstrapper

If the Game Instance Server Bootstrapper is enabled.

protected bool bEnableClientBootstrapper

If the Game Instance Client Bootstrapper is enabled.

protected template<>
inline UClassToUse * AddSubsystemPlugin(const FSoftClassPath & SubsystemClassPath)

Adds a plugin to the Game Instance Subsystem.

Parameters

  • SubsystemClassPath The class path of the plugin to add.

Returns

The plugin that was added.

protected inline virtual void AddSubsystemPlugin(URH_GameInstanceSubsystemPlugin * InPlugin)

Adds a plugin to the Game Instance Subsystem.

Parameters

  • SubsystemClassPath The class path of the plugin to add.

Returns

The plugin that was added.

protected virtual void AppSuspendCallbackInGameThread()

Handle application going into suspension (these involve the application losing focus).

protected virtual void AppResumeCallbackInGameThread()

Handle application resuming from suspension (these involve the application losing focus).

protected virtual void AppDeactivatedCallbackInGameThread()

Handle application deactivating (these involve the game shutting down and pausing (such as when a console is put to sleep)).

protected virtual void AppReactivatedCallbackInGameThread()

Handle application reactivating (these involve the game shutting down and pausing (such as when a console is put to sleep)).

struct FRH_BootstrappingResult

An result object that contains the accumulated results for the bootstrapping flow.

Summary

MembersDescriptions
public FRH_GameHostAllocationInfo AllocationInfoAllocation info from the provider.
public TOptional< FString > ETagEtag for the session.
public TOptional< FRH_APISessionWithETag>SessionSession data.
public TOptional< FRHAPI_SessionTemplate>TemplateSession template.
public inline FRH_BootstrappingResult()Default constructor.
public inline FRH_BootstrappingResult(const FRH_GameHostAllocationInfo & InAllocationInfo)Constructor with Host Allocation Info.
public inline FORCEINLINE bool IsValid() constWhether or not this result is valid (it has the required IDs to be finalized)
public inline FORCEINLINE bool IsComplete() constWhether or not this result is complete (it has valid and matching session information)

Members

public FRH_GameHostAllocationInfo AllocationInfo

Allocation info from the provider.

public TOptional< FString > ETag

Etag for the session.

public TOptional< FRH_APISessionWithETag>Session

Session data.

public TOptional< FRHAPI_SessionTemplate>Template

Session template.

public inline FRH_BootstrappingResult()

Default constructor.

public inline FRH_BootstrappingResult(const FRH_GameHostAllocationInfo & InAllocationInfo)

Constructor with Host Allocation Info.

public inline FORCEINLINE bool IsValid() const

Whether or not this result is valid (it has the required IDs to be finalized)

public inline FORCEINLINE bool IsComplete() const

Whether or not this result is complete (it has valid and matching session information)

struct FRH_ActiveSessionStatePlayerContext

Summary

MembersDescriptions
public FGuid RHPlayerIdThe player id for the context.
public TWeakObjectPtr< AController > ControllerThe controller for the context.
public FDateTime JoinedTimeThe time the player joined the server.
public FDateTime LeaveTimeThe time the player left the server.
public float DurationSecondsThe total time the player has been connected.
public inline FRH_ActiveSessionStatePlayerContext()

Members

public FGuid RHPlayerId

The player id for the context.

public TWeakObjectPtr< AController > Controller

The controller for the context.

public FDateTime JoinedTime

The time the player joined the server.

public FDateTime LeaveTime

The time the player left the server.

public float DurationSeconds

The total time the player has been connected.

public inline FRH_ActiveSessionStatePlayerContext()