GameInstance
Summary
| Members | Descriptions |
|---|---|
enum ERH_ServerBootstrapMode | An enum for the handled bootstrapping modes. |
enum ERH_ServerBootstrapFlowStep | An enum for the steps in the bootstrapping flow. |
class URH_BootstrappingSettings | An settings object that contains the settings for the bootstrapping flow. |
class URH_GameInstanceServerBootstrapper | Server Bootstrapper for the Game Instance. |
class URH_GameInstanceClientBootstrapper | Client Boostrapper for the Game Instance. |
class URH_GameInstanceSessionSubsystem | Subsystem for handling sessions within a game instance. |
class URH_GameInstanceSubsystem | Subsystem for the Game Instance. |
struct FRH_BootstrappingResult | An result object that contains the accumulated results for the bootstrapping flow. |
Members
enum ERH_ServerBootstrapMode
| Values | Descriptions |
|---|---|
| GameHostProvider | We are in an unknown mode which cannot be handled internally to this subsystem, instead rely on the GameHostProvider to handle the mode |
| Disabled | Bootstrapping is disabled entirely |
| LoginOnly | Bootstrapping is restricted to login only |
| AutoCreate | Special 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
| Values | Descriptions |
|---|---|
| Unstarted | Bootstrapping has not been started |
| Failed | Bootstrapping has failed |
| LoggingIn | Bootstrapping is logging into the RallyHere API |
| Recycling | Bootstrapping is doing an internal recycle of the server state (note: initial boot uses this state to initialize as well) |
| Registration | Bootstrapping is registering the server with the provider |
| WaitingForSession | Bootstrapping has received an allocation and is attempting to lookup the corresponding session |
| SyncingToSession | Bootstrapping has retrieved the session, validated it, and is attempting to synchronize the GameInstanceSessionSubsystem to that session |
| Complete | Bootstrapping has completed (though may be recycled in the future) |
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
| Members | Descriptions |
|---|---|
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. |
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
| Members | Descriptions |
|---|---|
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. |
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() 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 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). |
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() 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 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. |
public virtual bool GetTemplate(const FString & Type,FRHAPI_SessionTemplate & Template) const | Gets a session template by type. |
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. |
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 FDelegateHandle OnOSSLoginCompleteDelegateHandle | Delegate handle for the OSS login call |
protected FAuthContextPtr AuthContext | The auth context for this bootstrapper |
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. |
protected virtual void OnBootstrappingFailed() | 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 BeginOSSLogin() | Bootstrapping Flow [LoggingIn] - begin platform OSS login to generate login credentials. |
protected virtual void OnOSSLoginComplete(int32 ControllerId,bool bSuccessful,const FUniqueNetId & UniqueId,const FString & ErrorMessage) | Bootstrapping Flow [LoggingIn] - completion callback for platform OSS login with credentials to use. |
protected virtual void OnServerLoginComplete(bool bSuccess) | 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_JoinedSession * RHSession) | 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(bool bSuccess) | Bootstrapping Flow [SyncingToSession] - completiong callback for session sync. |
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 CleanupAfterInstanceRemoval() | Utility function to clean up state after an instance removal and attempt to recycle. |
protected virtual void OnCleanupSessionSyncComplete(bool bSuccess) | Completion callback for session and instance cleanup. |
protected virtual bool ShouldRecycleAfterCleanup() const | Gets whether we should recycle the state after cleanup. |
Members
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
-
PublicConnStrThe public connection string to use -
PrivateConnStrThe 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
DeltaTimeThe 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 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
SessionThe Session to import.
public virtual void ImportAPITemplate(const FRHAPI_SessionTemplate & Template)
Imports the template into the owner’s template list (ex: from polling).
Parameters
TemplateWrapperThe 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
-
SessionIdsThe list of sessions that we are reconciling against. -
ETagThe 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
-
InTemplatesThe list of templates that we are reconciling against. -
ETagThe 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 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
SessionIdThe Session Id to get.
Returns
The Session with the given Id.
public virtual bool GetTemplate(const FString & Type,FRHAPI_SessionTemplate & Template) const
Gets a session template by type.
Parameters
-
Typethe Type of template to get. -
TemplateThe 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.
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 FDelegateHandle OnOSSLoginCompleteDelegateHandle
Delegate handle for the OSS login call
protected FAuthContextPtr AuthContext
The auth context for this bootstrapper
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
NewStepThe new step to transition to
protected virtual void OnBootstrappingFailed()
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 BeginOSSLogin()
Bootstrapping Flow [LoggingIn] - begin platform OSS login to generate login credentials.
protected virtual void OnOSSLoginComplete(int32 ControllerId,bool bSuccessful,const FUniqueNetId & UniqueId,const FString & ErrorMessage)
Bootstrapping Flow [LoggingIn] - completion callback for platform OSS login with credentials to use.
Parameters
-
ControllerIdThe controller id that was used to login -
bSuccessfulWhether or not the login was successful -
UniqueIdThe unique id of the user that logged in -
ErrorMessageThe error message if the login failed
protected virtual void OnServerLoginComplete(bool bSuccess)
Bootstrapping Flow [Login] - completion callback for RallyHere API login.
Parameters
bSuccessWhether 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
bSuccessWhether 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
bSuccessWhether 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
-
StatusWhether or not the allocation was successful or had an error -
AllocationInfoThe 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
bSuccessWhether 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
bSuccessWhether 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
-
bSuccessWhether or not the registration was successful -
ResultThe bootstrapping result that was produced
protected virtual void OnSessionInstanceCreationCompleted(bool bSuccess,URH_JoinedSession * RHSession)
Bootstrapping Flow [WaitingForSession] - callback for when registration process has completed and produced a bootstrapping result.
Parameters
-
bSuccessWhether or not the instance was successfully created -
RHSessionThe session that was created with an instance
protected virtual void SyncToSession()
Bootstrapping Flow [SyncingToSession] - begin the process of synchronizing the session state into RH_GameInstanceSessionSubsystem.
protected virtual void OnSyncToSessionComplete(bool bSuccess)
Bootstrapping Flow [SyncingToSession] - completiong callback for session sync.
Parameters
bSuccessWhether or not the session sync was successful
protected virtual void OnSessionUpdated(URH_SessionView * Session)
Notification callback that the session we have synced to was updated.
Parameters
SessionThe updated session
protected virtual void OnSessionNotFound(URH_SessionView * Session)
Notification callback that the session we have synced to was not found.
Parameters
SessionThe session that was not found
protected virtual void CleanupAfterInstanceRemoval()
Utility function to clean up state after an instance removal and attempt to recycle.
protected virtual void OnCleanupSessionSyncComplete(bool bSuccess)
Completion callback for session and instance cleanup.
protected virtual bool ShouldRecycleAfterCleanup() const
Gets whether we should recycle the state after cleanup.
class URH_GameInstanceClientBootstrapper
class URH_GameInstanceClientBootstrapper
: public URH_GameInstanceSubsystemPlugin
Client Boostrapper for the Game Instance.
Summary
| Members | Descriptions |
|---|---|
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_GameInstanceSessionSubsystem
class URH_GameInstanceSessionSubsystem
: public URH_GameInstanceSubsystemPlugin
Subsystem for handling sessions within a game instance.
Summary
| Members | Descriptions |
|---|---|
public FRH_OnBeaconCreatedDelegate OnBeaconCreated | Multicast delegate fired when a beacon is created so that host objects can be registered. |
public FRH_OnBeaconCreatedDynamicDelegate BLUEPRINT_OnBeaconCreated | Multicast delegate fired when a beacon is created so that host objects can be registered. |
public virtual void Initialize() | Initialize the subsystem. |
public virtual void Deinitialize() | Safely tears down the subsystem. |
public virtual void SyncToSession(URH_JoinedSession * SessionInfo,FRH_GameInstanceSessionSyncBlock Delegate) | Requests the the instance to transition to a new session. |
public inline void BLUEPRINT_SyncToSession(URH_JoinedSession * SessionInfo,const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate) | Blueprint compatible wrapper for SyncToSession. |
public virtual const FRHAPI_InstanceInfo*GetInstance() const | Gets the Session Data for the active session. |
public virtual bool IsLocallyHostedInstance(const FRHAPI_InstanceInfo & Instance) const | Checks it the session data is for a locally hosted instance. |
public inline virtual bool IsLocallyHostedSession(const URH_JoinedSession * Session) const | Checks it the session is locally hosted. |
public virtual bool IsPlayerLocal(const FRHAPI_SessionPlayer & Player) const | Checks if a given player in a session is local to the client. |
public inline FORCEINLINE URH_JoinedSession*GetDesiredSession() const | Gets the session that the instance is swapping to. |
public inline FORCEINLINE URH_JoinedSession*GetActiveSession() const | Gets the session that is currently active. |
public inline FORCEINLINE bool IsMarkedFubar() const | Gets if the instance has been marked failed. |
public virtual bool IsReadyToJoinInstance(const URH_JoinedSession * Session,bool bLog) const | Checks if the session has all the players and is good to change maps. |
public virtual bool StartJoinInstanceFlow(FRH_GameInstanceSessionSyncBlock Delegate) | Starts the process of transitioning the instance to a new session. |
public inline bool BLUEPRINT_StartJoinInstanceFlow(const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate) | Blueprint compatible wrapper for StartJoinInstanceFlow. |
public virtual void StartLeaveInstanceFlow(bool bAlreadyDisconnected,bool bCheckDesired,FRH_GameInstanceSessionSyncBlock Delegate) | Starts the process of leaving a previous the instance session. |
public inline void BLUEPRINT_StartLeaveInstanceFlow(bool bAlreadyDisconnected,bool bCheckDesired,const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate) | Blueprint compatible wrapper for StartLeaveInstanceFlow. |
public virtual void MarkInstanceFubar(const FString & Reason,FRH_GenericSuccessWithErrorBlock Delegate) | Set an instance to a failed state marking it unrecoverable. |
public inline FORCEINLINE void MarkInstanceFubar(const FString & Reason,FRH_GenericSuccessBlock Delegate) | |
public inline void BLUEPRINT_MarkInstanceFubar(const FString & Reason,const FRH_GenericSuccessWithErrorDynamicDelegate & Delegate) | Blueprint compatible wrapper for MarkInstanceFubar. |
public virtual bool GenerateJoinURL(const URH_JoinedSession * Session,FURL & lastURL,FURL & outURL) const | Attempt to generate a join URL from a session. |
public virtual bool GenerateHostURL(const URH_JoinedSession * Session,FURL & lastURL,FURL & outURL) const | Attempt to generate a host URL from a session. |
protected URH_JoinedSession*DesiredSession | Session we want to sync to. |
protected URH_JoinedSession*ActiveSession | Session we are synced to. |
protected bool bHasBeenMarkedFubar | If set, the session instance is failed and unrecoverable. |
protected virtual void OnMapLoadComplete(UWorld * pWorld) | Called when the map completes loading. |
protected virtual void OnNetworkFailure(UWorld * World,UNetDriver * NetDriver,ENetworkFailure::Type FailureType,const FString & ErrorString) | Called when there was a network failure trying to connect to the instance. |
protected virtual void OnTravelFailure(UWorld * pWorld,ETravelFailure::Type FailureType,const FString & ErrorString) | Called when there is a travel failure to the instance map. |
protected virtual class ARH_OnlineBeaconHost * CreateBeaconHost(class UWorld * pWorld,uint32 ListenPort,bool bShutdownWorldNetDriver) | Creates a beacon host for the instance. |
Members
public FRH_OnBeaconCreatedDelegate OnBeaconCreated
Multicast delegate fired when a beacon is created so that host objects can be registered.
public FRH_OnBeaconCreatedDynamicDelegate BLUEPRINT_OnBeaconCreated
Multicast delegate fired when a beacon is created so that host objects can be registered.
public virtual void Initialize()
Initialize the subsystem.
public virtual void Deinitialize()
Safely tears down the subsystem.
public virtual void SyncToSession(URH_JoinedSession * SessionInfo,FRH_GameInstanceSessionSyncBlock Delegate)
Requests the the instance to transition to a new session.
Parameters
-
SessionInfoThe session being transitioned to. -
DelegateCallback delegate for when the session is now active, or failed to transition.
public inline void BLUEPRINT_SyncToSession(URH_JoinedSession * SessionInfo,const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate)
Blueprint compatible wrapper for SyncToSession.
public virtual const FRHAPI_InstanceInfo*GetInstance() const
Gets the Session Data for the active session.
public virtual bool IsLocallyHostedInstance(const FRHAPI_InstanceInfo & Instance) const
Checks it the session data is for a locally hosted instance.
Parameters
InstanceThe instance being checked.
Returns
If true, the instance is hosted locally.
public inline virtual bool IsLocallyHostedSession(const URH_JoinedSession * Session) const
Checks it the session is locally hosted.
Parameters
SessionThe session being checked.
Returns
If true, the session is hosted locally.
public virtual bool IsPlayerLocal(const FRHAPI_SessionPlayer & Player) const
Checks if a given player in a session is local to the client.
Parameters
PlayerThe player being checked.
Returns
If true, the player is local to the client.
public inline FORCEINLINE URH_JoinedSession*GetDesiredSession() const
Gets the session that the instance is swapping to.
public inline FORCEINLINE URH_JoinedSession*GetActiveSession() const
Gets the session that is currently active.
public inline FORCEINLINE bool IsMarkedFubar() const
Gets if the instance has been marked failed.
public virtual bool IsReadyToJoinInstance(const URH_JoinedSession * Session,bool bLog) const
Checks if the session has all the players and is good to change maps.
Parameters
SessionThe session being checked.
Returns
If true, the session is ready for a map transition.
public virtual bool StartJoinInstanceFlow(FRH_GameInstanceSessionSyncBlock Delegate)
Starts the process of transitioning the instance to a new session.
Parameters
DelegateCallback delegate for when the session is now active, or failed to transition.
public inline bool BLUEPRINT_StartJoinInstanceFlow(const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate)
Blueprint compatible wrapper for StartJoinInstanceFlow.
public virtual void StartLeaveInstanceFlow(bool bAlreadyDisconnected,bool bCheckDesired,FRH_GameInstanceSessionSyncBlock Delegate)
Starts the process of leaving a previous the instance session.
Parameters
-
bAlreadyDisconnectedIf true, the instance is already disconnected from the previous session. -
bCheckDesiredIf true, and the instance has a desired session, start joining that session. -
DelegateCallback delegate for when the instance is left.
public inline void BLUEPRINT_StartLeaveInstanceFlow(bool bAlreadyDisconnected,bool bCheckDesired,const FRH_GameInstanceSessionSyncDynamicDelegate & Delegate)
Blueprint compatible wrapper for StartLeaveInstanceFlow.
public virtual void MarkInstanceFubar(const FString & Reason,FRH_GenericSuccessWithErrorBlock Delegate)
Set an instance to a failed state marking it unrecoverable.
Parameters
-
ReasonThe reason the instance was marked failed. -
DelegateCallback delegate for if the instance was marked failed.
public inline FORCEINLINE void MarkInstanceFubar(const FString & Reason,FRH_GenericSuccessBlock Delegate)
public inline void BLUEPRINT_MarkInstanceFubar(const FString & Reason,const FRH_GenericSuccessWithErrorDynamicDelegate & Delegate)
Blueprint compatible wrapper for MarkInstanceFubar.
public virtual bool GenerateJoinURL(const URH_JoinedSession * Session,FURL & lastURL,FURL & outURL) const
Attempt to generate a join URL from a session.
Parameters
-
SessionThe session to be joined. -
lastURLThe last URL used to connect to a session. -
outURLThe URL to join the session.
Returns
If true, a join URL was generated.
public virtual bool GenerateHostURL(const URH_JoinedSession * Session,FURL & lastURL,FURL & outURL) const
Attempt to generate a host URL from a session.
Parameters
-
SessionThe session a host url is being requested for. -
lastURLThe last URL used to connect to a session. -
outURLThe Host URL fot the session.
Returns
If true, a host URL was generated.
protected URH_JoinedSession*DesiredSession
Session we want to sync to.
protected URH_JoinedSession*ActiveSession
Session we are synced to.
protected bool bHasBeenMarkedFubar
If set, the session instance is failed and unrecoverable.
protected virtual void OnMapLoadComplete(UWorld * pWorld)
Called when the map completes loading.
Parameters
pWorldThe world that was being traveled to.
protected virtual void OnNetworkFailure(UWorld * World,UNetDriver * NetDriver,ENetworkFailure::Type FailureType,const FString & ErrorString)
Called when there was a network failure trying to connect to the instance.
Parameters
-
WorldThe world that was being connected to. -
NetDriverThe net driver that was being used to connect. -
FailureTypeThe type of failure that occurred. -
ErrorStringThe error string associated with the failure.
protected virtual void OnTravelFailure(UWorld * pWorld,ETravelFailure::Type FailureType,const FString & ErrorString)
Called when there is a travel failure to the instance map.
Parameters
-
pWorldThe world that was being traveled to. -
FailureTypeThe type of failure that occurred. -
ErrorStringThe error string associated with the failure.
protected virtual class ARH_OnlineBeaconHost * CreateBeaconHost(class UWorld * pWorld,uint32 ListenPort,bool bShutdownWorldNetDriver)
Creates a beacon host for the instance.
Parameters
-
pWorldThe world the beacon is for. -
ListenPortThe port the beacon listens to. -
bShutdownWorldNetDriverIf set, then the beacon shuts down the worlds Net Driver when created.
class URH_GameInstanceSubsystem
class URH_GameInstanceSubsystem
: public UGameInstanceSubsystem
Subsystem for the Game Instance.
Summary
| Members | Descriptions |
|---|---|
public inline bool ShouldCreateSubsystem(UObject * Outer) const | Gets if the subsystem is enabled and should be created. |
public void Initialize(FSubsystemCollectionBase & Collection) | Initialize the subsystem. |
public void Deinitialize() | Safely tears down the subsystem. |
public inline void SetAuthContext(FAuthContextPtr InAuthContext) | Sets the Auth Context for the subsystem. |
public inline FAuthContextPtr GetAuthContext() const | Gets the subsystems designated auth context. |
public inline URH_GameInstanceSessionSubsystem*GetSessionSubsystem() const | Gets the session subsystem on the instance. |
public inline URH_SessionBrowserCache*GetSessionSearchCache() const | Gets the session search cache on the instance. |
public inline URH_MatchmakingBrowserCache*GetMatchmakingCache() const | Gets the matchmaking cache on the instance. |
public inline URH_GameInstanceServerBootstrapper*GetServerBootstrapper() const | Gets the server bootstrapper on the instance. |
public inline URH_GameInstanceClientBootstrapper*GetClientBootstrapper() const | Gets the client boostrapper on the instance. |
public inline URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() const | Gets the player info subsystem on the instance. |
public inline URH_CatalogSubsystem*GetCatalogSubsystem() const | Gets the catalog subsystem on the instance. |
public inline URH_ConfigSubsystem*GetConfigSubsystem() const | Gets the config subsystem on the instance. |
public void GameModePreloginEvent(class AGameModeBase * GameMode,const FUniqueNetIdRepl & NewPlayer,FString & ErrorMessage) | Handles verification and validation of a player attempting to connect to the instance. |
public bool ValidateIncomingConnection(class UNetConnection * Connection,FString & ErrorMessage) const | |
public void CustomEndpoint(const FRH_CustomEndpointRequestWrapper & Request,const RallyHereAPI::FDelegate_CustomEndpointSend & Delegate) | Custom Endpoint wrapper (for custom endpoints that require authentication) |
public 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 AuthContext | Auth context 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 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 bool bUseSecurityTokenForJoining | If set, the connection attempt must have a valid security token to be allowed to connect. |
protected bool bRequireImportedPlayerIdsForJoining | If set, the Player Id must have been imported to the instance before being allowed to connect. |
protected bool bRequireValidPlayerIdsForJoining | If set, the Player Id must be valid before being allowed to connect. |
protected template<> inline UClassToUse * AddSubsystemPlugin(FSoftClassPath SubsystemClassPath) | Adds a plugin to the Game Instance Subsystem. |
Members
public inline bool ShouldCreateSubsystem(UObject * Outer) const
Gets if the subsystem is enabled and should be created.
public void Initialize(FSubsystemCollectionBase & Collection)
Initialize the subsystem.
public void Deinitialize()
Safely tears down the subsystem.
public inline void SetAuthContext(FAuthContextPtr InAuthContext)
Sets the Auth Context for the subsystem.
Parameters
InAuthContextThe Auth Context to set with.
public inline FAuthContextPtr GetAuthContext() const
Gets the subsystems designated auth context.
public inline URH_GameInstanceSessionSubsystem*GetSessionSubsystem() const
Gets the session subsystem on the instance.
public inline URH_SessionBrowserCache*GetSessionSearchCache() const
Gets the session search cache on the instance.
public inline URH_MatchmakingBrowserCache*GetMatchmakingCache() const
Gets the matchmaking cache on the instance.
public inline URH_GameInstanceServerBootstrapper*GetServerBootstrapper() const
Gets the server bootstrapper on the instance.
public inline URH_GameInstanceClientBootstrapper*GetClientBootstrapper() const
Gets the client boostrapper on the instance.
public inline URH_PlayerInfoSubsystem*GetPlayerInfoSubsystem() const
Gets the player info subsystem on the instance.
public inline URH_CatalogSubsystem*GetCatalogSubsystem() const
Gets the catalog subsystem on the instance.
public inline URH_ConfigSubsystem*GetConfigSubsystem() const
Gets the config subsystem on the instance.
public void GameModePreloginEvent(class AGameModeBase * GameMode,const FUniqueNetIdRepl & NewPlayer,FString & ErrorMessage)
Handles verification and validation of a player attempting to connect to the instance.
Parameters
-
GameModeThe game mode the instance is running. -
NewPlayerThe player that is attempting to connect. -
ErrorMessageIf an Error happens for this player being valid, this will be set to the error message.
public bool ValidateIncomingConnection(class UNetConnection * Connection,FString & ErrorMessage) const
public 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 -
DelegateThe delegate to call when the call is complete (contains raw response)
public 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 -
DelegateThe 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 -
DelegateThe delegate to call when the call is complete
protected FAuthContextPtr AuthContext
Auth context 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 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 bool bUseSecurityTokenForJoining
If set, the connection attempt must have a valid security token to be allowed to connect.
protected bool bRequireImportedPlayerIdsForJoining
If set, the Player Id must have been imported to the instance before being allowed to connect.
protected bool bRequireValidPlayerIdsForJoining
If set, the Player Id must be valid before being allowed to connect.
protected template<>
inline UClassToUse * AddSubsystemPlugin(FSoftClassPath SubsystemClassPath)
Adds a plugin to the Game Instance Subsystem.
Parameters
SubsystemClassPathThe class path of the plugin to add.
Returns
The plugin that was added.
struct FRH_BootstrappingResult
An result object that contains the accumulated results for the bootstrapping flow.
Summary
| Members | Descriptions |
|---|---|
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) |
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)