Loading...
Searching...
No Matches
FOnlineSessionV2AccelByte Class Reference
Inheritance diagram for FOnlineSessionV2AccelByte:

Public Member Functions

FUniqueNetIdPtr CreateSessionIdFromString (const FString &SessionIdStr) override
class FNamedOnlineSession * GetNamedSession (FName SessionName) override
void RemoveNamedSession (FName SessionName) override
bool HasPresenceSession () override
EOnlineSessionState::Type GetSessionState (FName SessionName) const override
bool CreateSession (int32 HostingPlayerNum, FName SessionName, const FOnlineSessionSettings &NewSessionSettings) override
bool CreateSession (const FUniqueNetId &HostingPlayerId, FName SessionName, const FOnlineSessionSettings &NewSessionSettings) override
bool StartSession (FName SessionName) override
bool UpdateSession (FName SessionName, FOnlineSessionSettings &UpdatedSessionSettings, bool bShouldRefreshOnlineData=true) override
bool EndSession (FName SessionName) override
bool DestroySession (FName SessionName, const FOnDestroySessionCompleteDelegate &CompletionDelegate=FOnDestroySessionCompleteDelegate()) override
bool IsPlayerInSession (FName SessionName, const FUniqueNetId &UniqueId) override
bool StartMatchmaking (const TArray< TSharedRef< const FUniqueNetId > > &LocalPlayers, FName SessionName, const FOnlineSessionSettings &NewSessionSettings, TSharedRef< FOnlineSessionSearch > &SearchSettings) override
bool StartMatchmaking (const TArray< FSessionMatchmakingUser > &LocalPlayers, FName SessionName, const FOnlineSessionSettings &NewSessionSettings, TSharedRef< FOnlineSessionSearch > &SearchSettings, const FOnStartMatchmakingComplete &CompletionDelegate) override
bool CancelMatchmaking (int32 SearchingPlayerNum, FName SessionName) override
bool CancelMatchmaking (const FUniqueNetId &SearchingPlayerId, FName SessionName) override
bool FindSessions (int32 SearchingPlayerNum, const TSharedRef< FOnlineSessionSearch > &SearchSettings) override
bool FindSessions (const FUniqueNetId &SearchingPlayerId, const TSharedRef< FOnlineSessionSearch > &SearchSettings) override
bool FindSessionById (const FUniqueNetId &SearchingUserId, const FUniqueNetId &SessionId, const FUniqueNetId &FriendId, const FOnSingleSessionResultCompleteDelegate &CompletionDelegate) override
bool CancelFindSessions () override
bool PingSearchResults (const FOnlineSessionSearchResult &SearchResult) override
bool JoinSession (int32 LocalUserNum, FName SessionName, const FOnlineSessionSearchResult &DesiredSession) override
bool JoinSession (const FUniqueNetId &LocalUserId, FName SessionName, const FOnlineSessionSearchResult &DesiredSession) override
bool FindFriendSession (int32 LocalUserNum, const FUniqueNetId &Friend) override
bool FindFriendSession (const FUniqueNetId &LocalUserId, const FUniqueNetId &Friend) override
bool FindFriendSession (const FUniqueNetId &LocalUserId, const TArray< TSharedRef< const FUniqueNetId > > &FriendList) override
bool SendSessionInviteToFriend (int32 LocalUserNum, FName SessionName, const FUniqueNetId &Friend) override
bool SendSessionInviteToFriend (const FUniqueNetId &LocalUserId, FName SessionName, const FUniqueNetId &Friend) override
bool SendSessionInviteToFriends (int32 LocalUserNum, FName SessionName, const TArray< TSharedRef< const FUniqueNetId > > &Friends) override
bool SendSessionInviteToFriends (const FUniqueNetId &LocalUserId, FName SessionName, const TArray< TSharedRef< const FUniqueNetId > > &Friends) override
bool GetResolvedConnectString (FName SessionName, FString &ConnectInfo, FName PortType=NAME_GamePort) override
bool GetResolvedConnectString (const class FOnlineSessionSearchResult &SearchResult, FName PortType, FString &ConnectInfo) override
FOnlineSessionSettings * GetSessionSettings (FName SessionName) override
bool RegisterPlayer (FName SessionName, const FUniqueNetId &PlayerId, bool bWasInvited) override
bool RegisterPlayers (FName SessionName, const TArray< TSharedRef< const FUniqueNetId > > &Players, bool bWasInvited=false) override
bool UnregisterPlayer (FName SessionName, const FUniqueNetId &PlayerId) override
bool UnregisterPlayers (FName SessionName, const TArray< TSharedRef< const FUniqueNetId > > &Players) override
void RegisterLocalPlayer (const FUniqueNetId &PlayerId, FName SessionName, const FOnRegisterLocalPlayerCompleteDelegate &Delegate) override
void UnregisterLocalPlayer (const FUniqueNetId &PlayerId, FName SessionName, const FOnUnregisterLocalPlayerCompleteDelegate &Delegate) override
int32 GetNumSessions () override
void DumpSessionState () override
void RemovePlayerFromSession (int32 LocalUserNum, FName SessionName, const FUniqueNetId &TargetPlayerId) override
bool FindGameSessions (int32 SearchingPlayerNum, const TSharedRef< FOnlineSessionSearch > &SearchSettings, FAccelByteModelsV2GameSessionQueryFilter QueryFilter)
bool FindGameSessions (const FUniqueNetId &SearchingPlayerId, const TSharedRef< FOnlineSessionSearch > &SearchSettings, FAccelByteModelsV2GameSessionQueryFilter QueryFilter)
bool QueryAllInvites (const FUniqueNetId &PlayerId)
TArray< FOnlineSessionInviteAccelByteGetAllInvites () const
TArray< FOnlineSessionInviteAccelByteGetAllGameInvites () const
TArray< FOnlineSessionInviteAccelByteGetAllPartyInvites () const
bool RejectInvite (const FUniqueNetId &PlayerId, const FOnlineSessionInviteAccelByte &InvitedSession, const FOnRejectSessionInviteComplete &Delegate=FOnRejectSessionInviteComplete())
bool RestoreActiveSessions (const FUniqueNetId &LocalUserId, const FOnRestoreActiveSessionsComplete &Delegate=FOnRestoreActiveSessionsComplete())
TArray< FOnlineRestoredSessionAccelByteGetAllRestoredSessions () const
TArray< FOnlineRestoredSessionAccelByteGetAllRestoredPartySessions () const
TArray< FOnlineRestoredSessionAccelByteGetAllRestoredGameSessions () const
bool LeaveRestoredSession (const FUniqueNetId &LocalUserId, const FOnlineRestoredSessionAccelByte &SessionToLeave, const FOnLeaveSessionComplete &Delegate)
bool IsInPartySession () const
FNamedOnlineSession * GetPartySession () const
FNamedOnlineSession * GetNamedSessionById (const FString &SessionIdString)
void RegisterServer (FName SessionName, const FOnRegisterServerComplete &Delegate=FOnRegisterServerComplete())
void SendServerReady (FName SessionName, const FOnRegisterServerComplete &Delegate=FOnRegisterServerComplete())
 Notify the backend service that the server is already complete the prerequisite action(s) and ready to accept player. Either automatically called from RegisterServer if condition met (bRegisterServerOnAutoLogin is true) else call it manually after RegisterServer.
void UnregisterServer (FName SessionName, const FOnUnregisterServerComplete &Delegate=FOnUnregisterServerComplete())
void SetServerTimeout (int32 NewTimeout)
void ResetServerTimeout ()
EAccelByteV2SessionType GetSessionTypeByName (const FName &SessionName)
EAccelByteV2SessionType GetSessionTypeFromSettings (const FOnlineSessionSettings &Settings) const
FUniqueNetIdPtr GetSessionLeaderId (const FNamedOnlineSession *Session) const
bool KickPlayer (const FUniqueNetId &LocalUserId, const FName &SessionName, const FUniqueNetId &PlayerIdToKick, const FOnKickPlayerComplete &Delegate=FOnKickPlayerComplete())
bool PromoteGameSessionLeader (const FUniqueNetId &LocalUserId, const FName &SessionName, const FUniqueNetId &PlayerIdToPromote)
bool PromotePartySessionLeader (const FUniqueNetId &LocalUserId, const FName &SessionName, const FUniqueNetId &PlayerIdToPromote, const FOnPromotePartySessionLeaderComplete &Delegate=FOnPromotePartySessionLeaderComplete())
TArray< FString > GetRegionList (const FUniqueNetId &LocalPlayerId) const
TSharedPtr< FOnlineSessionSearchAccelByteGetCurrentMatchmakingSearchHandle () const
int32 GetSessionPlayerCount (const FName &SessionName) const
int32 GetSessionPlayerCount (const FOnlineSession &Session) const
int32 GetSessionMaxPlayerCount (const FName &SessionName) const
int32 GetSessionMaxPlayerCount (const FOnlineSession &Session) const
bool SetSessionMaxPlayerCount (const FName &SessionName, int32 NewMaxPlayerCount) const
bool SetSessionMaxPlayerCount (FOnlineSession *Session, int32 NewMaxPlayerCount) const
bool RefreshSession (const FName &SessionName, const FOnRefreshSessionComplete &Delegate)
bool RefreshActiveSessions (const FOnRefreshActiveSessionsComplete &Delegate)
bool RefreshActiveSessionsV2AfterReconnected (int32 LocalUserNum)
bool CreateBackfillTicket (const FName &SessionName, const FOnCreateBackfillTicketComplete &Delegate)
bool CreateBackfillTicket (const FName &SessionName, const FString &MatchPool, const FOnCreateBackfillTicketComplete &Delegate)
bool DeleteBackfillTicket (const FName &SessionName, const FOnDeleteBackfillTicketComplete &Delegate)
bool AcceptBackfillProposal (const FName &SessionName, const FAccelByteModelsV2MatchmakingBackfillProposalNotif &Proposal, bool bStopBackfilling, const FOnAcceptBackfillProposalComplete &Delegate, FAccelByteModelsV2MatchmakingBackfillAcceptanceOptionalParam const &OptionalParameter={})
bool RejectBackfillProposal (const FName &SessionName, const FAccelByteModelsV2MatchmakingBackfillProposalNotif &Proposal, bool bStopBackfilling, const FOnRejectBackfillProposalComplete &Delegate)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnUpdatePlayerReservedPartySessionStorageComplete, const FAccelByteModelsV2PartySessionStorageReservedData &, bool, const FOnlineError &)
bool GetPartySessionStorage (FUniqueNetIdAccelByteUserPtr UserUniqueNetId, const FOnGetPartySessionStorageComplete &Delegate)
bool IsCurrentUserEligiblePartyStorageAction (FUniqueNetIdAccelByteUserPtr UserUniqueNetId)
bool UpdatePartySessionStorageWithPastSessionInfo (FUniqueNetIdAccelByteUserPtr UserUniqueNetId)
void SetEnablePartyMemberPastSessionRecordSync (bool bEnable, uint32 AmountOfPastSessionRecorded=5)
bool GetEnablePartyMemberPastSessionRecordSync ()
bool UpdateMemberStatus (FName SessionName, const FUniqueNetId &PlayerId, const EAccelByteV2SessionMemberStatus &Status, const FOnSessionMemberStatusUpdateComplete &Delegate=FOnSessionMemberStatusUpdateComplete())
bool JoinSession (const FUniqueNetId &LocalUserId, FName SessionName, const FString &Code, EAccelByteV2SessionType SessionType=EAccelByteV2SessionType::PartySession)
bool GenerateNewPartyCode (const FUniqueNetId &LocalUserId, FName SessionName, const FOnGenerateNewPartyCodeComplete &Delegate)
bool RevokePartyCode (const FUniqueNetId &LocalUserId, FName SessionName, const FOnRevokePartyCodeComplete &Delegate)
bool GenerateNewGameCode (const FUniqueNetId &LocalUserId, FName SessionName, const FOnGenerateNewGameCodeComplete &Delegate)
bool RevokeGameCode (const FUniqueNetId &LocalUserId, FName SessionName, const FOnRevokeGameCodeComplete &Delegate)
void SetLocalServerNameOverride (const FString &InLocalServerNameOverride)
void SetLocalServerIpOverride (const FString &InLocalServerIpOverride)
void SetLocalServerPortOverride (int32 InLocalServerPortOverride)
FOnlineSessionV2AccelBytePlayerAttributes GetPlayerAttributes (const FUniqueNetId &LocalPlayerId)
bool UpdatePlayerAttributes (const FUniqueNetId &LocalPlayerId, const FOnlineSessionV2AccelBytePlayerAttributes &NewAttributes, const FOnUpdatePlayerAttributesComplete &Delegate=FOnUpdatePlayerAttributesComplete())
bool IsPlayerP2PHost (const FUniqueNetId &LocalUserId, FName SessionName)
bool FindPlayerMemberSettings (FOnlineSessionSettings &InSettings, const FUniqueNetId &PlayerId, FSessionSettings &OutMemberSettings) const
bool FindPlayerMemberSettings (FOnlineSessionSettings &InSettings, const FUniqueNetId &PlayerId, TSharedPtr< FSessionSettings > &OutMemberSettings) const
bool UpdateSessionLeaderStorage (const FUniqueNetId &LocalUserId, FName SessionName, FJsonObjectWrapper const &Data)
bool UpdateSessionMemberStorage (const FUniqueNetId &LocalUserId, FName SessionName, FJsonObjectWrapper const &Data)
bool UpdatePartySessionStorage (const FUniqueNetId &LocalUserId, FJsonObjectWrapper const &Data)
bool GetMyActiveMatchTicket (const FUniqueNetId &LocalUserId, FName SessionName, const FString &MatchPool)
bool SessionContainsMember (const FUniqueNetId &UserId, FName SessionName)
bool CancelSessionInvite (int32 LocalUserNum, FName SessionName, const FUniqueNetId &Invitee)
bool CancelSessionInvite (const FUniqueNetId &LocalUserId, FName SessionName, const FUniqueNetId &Invitee)
void SetMatchTicketCheckEnabled (const bool Enabled)
bool GetMatchTicketCheckEnabled () const
void SetMatchTicketCheckInitialDelay (const int32 Sec)
int32 GetMatchTicketCheckInitialDelay () const
void SetMatchTicketCheckPollInterval (const int32 Sec)
int32 GetMatchTicketCheckPollInterval () const
void SetSessionServerCheckPollEnabled (bool Enabled)
bool GetSessionServerCheckPollEnabled () const
void SetSessionServerCheckPollInitialDelay (int32 Sec)
int32 GetSessionServerCheckPollInitialDelay () const
void SetSessionServerCheckPollInterval (int32 Sec)
int32 GetSessionServerCheckPollInterval () const
void SetSessionInviteCheckPollEnabled (bool Enabled)
bool GetSessionInviteCheckPollEnabled () const
void SetSessionInviteCheckPollInitialDelay (int32 Sec)
int32 GetSessionInviteCheckPollInitialDelay () const
void SetSessionInviteCheckPollInterval (int32 Sec)
int32 GetSessionInviteCheckPollInterval () const
bool FindSessionByStringId (const FUniqueNetId &SearchingUserId, const EAccelByteV2SessionType &SessionType, const FString &SessionId, const FOnSingleSessionResultCompleteDelegate &CompletionDelegate)
 Find a game or party session by its ID.
bool FindSessionByStringId (int32 LocalUserNum, const EAccelByteV2SessionType &SessionType, const FString &SessionId, const FOnSingleSessionResultCompleteDelegate &CompletionDelegate)
 Find a game or party session by its ID.
bool StartMatchmaking (const TArray< FSessionMatchmakingUser > &LocalPlayers, FName SessionName, const FOnlineSessionSettings &NewSessionSettings, TSharedRef< FOnlineSessionSearchAccelByte > &SearchSettings, const FOnStartMatchmakingComplete &CompletionDelegate)
bool UpdateDSInformation (FName SessionName, FAccelByteModelsGameSessionUpdateDSInformationRequest const &NewDSInformation, FOnUpdateDSInformationComplete const &CompletionDelegate)
 Update DS information for the session associated with the given session name. Only implemented for dedicated servers.
void ConnectToThirdPartyDSHub (const FString &ServerName)
 Connect to the DSHub websocket, as well as register internal callbacks relating to DSHub events. Not intended to be called for AMS usage, RegisterServer already does this in the background as part of its logic.
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnServerReceivedSession, FName)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnQueryAllInvitesComplete, bool, const FUniqueNetId &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnV2SessionInviteReceived, const FUniqueNetId &, const FUniqueNetId &, const FOnlineSessionInviteAccelByte &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnV2SessionInviteTimeoutReceived, const FUniqueNetId &, const FOnlineSessionInviteAccelByte &, EAccelByteV2SessionType)
 DEFINE_ONLINE_DELEGATE (OnInviteListUpdated)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSessionServerUpdate, FName)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSessionServerError, FName, const FString &)
 DEFINE_ONLINE_DELEGATE (OnMatchmakingStarted)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnMatchmakingExpired, TSharedPtr< FOnlineSessionSearchAccelByte >)
 DEFINE_ONLINE_DELEGATE (OnMatchmakingCanceled)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnMatchmakingCanceledReason, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnBackfillProposalReceived, FAccelByteModelsV2MatchmakingBackfillProposalNotif)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnBackfillTicketExpiredReceived, FName, FAccelByteModelsV2MatchmakingBackfillTicketExpireNotif)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSessionInvitesChanged, FName)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnKickedFromSession, FName)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSessionUpdateReceived, FName)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSessionUpdateRequestComplete, FName, bool)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSessionUpdateConflictError, FName, FOnlineSessionSettings)
 DEFINE_ONLINE_DELEGATE (OnAMSDrainReceived)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnSendSessionInviteComplete, const FUniqueNetId &, FName, bool, const FUniqueNetId &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSessionInviteRejected, FName, const FUniqueNetId &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnPlayerAttributesInitialized, const FUniqueNetId &, bool)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSessionRemoved, FName)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnReconnectedRefreshSession, bool, const TArray< FName > &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSessionLeaderStorageUpdateReceived, FName)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSessionMemberStorageUpdateReceived, FName, const FUniqueNetId &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnUpdateSessionLeaderStorageComplete, FName, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnUpdateSessionMemberStorageComplete, FName, const FUniqueNetId &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnUpdatePartySessionStorageComplete, FName, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnSendDSSessionReadyComplete, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnV2SessionEnded, FName)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnAutoJoinGameSessionComplete, int32, bool, FString)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (AccelByteOnConnectAMSComplete, bool, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnAMSReconnectAttempted, const AccelByte::FReconnectAttemptInfo &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnAMSMassiveOutageEvent, const AccelByte::FMassiveOutageInfo &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnDSHubReconnectAttempted, const AccelByte::FReconnectAttemptInfo &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnDSHubMassiveOutageEvent, const AccelByte::FMassiveOutageInfo &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnDSHubFailedToConnect, const FString &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnPartySessionCreated, const FUniqueNetId &, const FOnlineSession &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnPartyStorageUpdateReceived, FName, const FUniqueNetId &)
 FOnlineSessionV2AccelByte (FOnlineSubsystemAccelByte *InSubsystem)
void Init ()
void UpdateSessionEntries ()
void OnMatchTicketCheckGetSessionInfoById (int32 LocalUserNum, bool bWasSuccessful, const FOnlineSessionSearchResult &SessionSearchResult)
void CheckMatchmakingProgress ()
void CheckSessionServerProgress ()
void CheckSessionInviteAfterMatchFound ()
void Tick (float DeltaTime)
void RegisterSessionNotificationDelegates (const FUniqueNetId &PlayerId)
EAccelByteV2SessionJoinability GetJoinabilityFromString (const FString &JoinabilityStr) const
EAccelByteV2SessionType GetSessionTypeFromString (const FString &SessionTypeStr) const
EAccelByteV2SessionJoinability GetJoinabiltyFromSessionSettings (const FOnlineSessionSettings &Settings) const
FString GetJoinabilityAsString (const EAccelByteV2SessionJoinability &Joinability)
FString GetServerTypeAsString (const EAccelByteV2SessionConfigurationServerType &ServerType) const
EAccelByteV2SessionConfigurationServerType GetServerTypeFromString (const FString &ServerType) const
void FinalizeCreateGameSession (const FName &SessionName, const FAccelByteModelsV2GameSession &BackendSessionInfo)
void FinalizeCreatePartySession (const FName &SessionName, const FAccelByteModelsV2PartySession &BackendSessionInfo)
bool ConstructGameSessionFromBackendSessionModel (const FAccelByteModelsV2GameSession &BackendSession, FOnlineSession &OutResult)
bool ConstructPartySessionFromBackendSessionModel (const FAccelByteModelsV2PartySession &BackendSession, FOnlineSession &OutResult)
void AddBuiltInGameSessionSettingsToSessionSettings (FOnlineSessionSettings &OutSettings, const FAccelByteModelsV2GameSession &GameSession)
void AddBuiltInPartySessionSettingsToSessionSettings (FOnlineSessionSettings &OutSettings, const FAccelByteModelsV2PartySession &PartySession)
bool ShouldSkipAddingFieldToSessionAttributes (const FName &FieldName) const
bool GetServerLocalIp (FString &OutIp) const
bool GetServerPort (int32 &OutPort, bool bIsLocal=false) const
bool GetLocalServerName (FString &OutServerName) const
bool GetServerClaimedSession (FName SessionName, const FString &SessionId)
bool RemoveRestoreSessionById (const FString &SessionIdStr)
bool RemoveInviteById (const FString &SessionIdStr)
bool LeaveSession (const FUniqueNetId &LocalUserId, const EAccelByteV2SessionType &SessionType, const FString &SessionId, const FOnLeaveSessionComplete &Delegate=FOnLeaveSessionComplete(), bool bUserKicked=false)
TArray< TSharedPtr< FJsonValue > > ConvertSessionSettingArrayToJson (const TArray< double > &Array) const
TArray< TSharedPtr< FJsonValue > > ConvertSessionSettingArrayToJson (const TArray< FString > &Array) const
bool ConvertSessionSettingJsonToArray (const TArray< TSharedPtr< FJsonValue > > *JsonArray, TArray< FString > &OutArray) const
bool ConvertSessionSettingJsonToArray (const TArray< TSharedPtr< FJsonValue > > *JsonArray, TArray< double > &OutArray) const
TSharedRef< FJsonObject > ConvertSessionSettingsToJsonObject (const FOnlineSessionSettings &Settings) const
bool ReadSessionSettingsFromSessionModel (FOnlineSessionSettings &OutSettings, const FAccelByteModelsV2BaseSession &Session) const
bool ReadMemberSettingsFromJsonObject (FSessionSettings &OutMemberSettings, const TSharedRef< FJsonObject > &Object) const
TSharedRef< FJsonObject > ConvertSearchParamsToJsonObject (const FOnlineSearchSettings &Params) const
void ConnectToJoinedP2PSession (FName SessionName, EOnlineSessionP2PConnectedAction Action)
void UpdateInternalGameSession (const FName &SessionName, const FAccelByteModelsV2GameSession &UpdatedGameSession, bool &bIsConnectingToP2P, const bool bIsFirstJoin=false, const bool bUpdateSessionStorage=true)
void UpdateInternalPartySession (const FName &SessionName, const FAccelByteModelsV2PartySession &UpdatedPartySession)
void ConnectToDSHub (const FString &ServerName)
void DisconnectFromDSHub ()
void SendReadyToAMS ()
void SetDSTimeout (int32 NewTimeout)
 set DS session timeout to the new number given.
void ResetDSTimeout ()
 reset DS session timeout to the one that already set in the fleet settings.
void DisconnectFromAMS ()
void OnMatchTicketCheckGetMatchTicketDetails (const FAccelByteModelsV2MatchmakingGetTicketDetailsResponse &Response, const FOnlineError &OnlineError)
void FinalizeStartMatchmakingComplete ()
void StartMatchTicketCheckPoll ()
void SetMatchTicketCheckPollToNextPollTime ()
void StopMatchTicketCheckPoll ()
void SendDSStatusChangedNotif (const int32 LocalUserNum, const TSharedPtr< FAccelByteModelsV2GameSession > &SessionData)
void StartSessionServerCheckPoll (const FUniqueNetIdPtr &SearchingPlayerId, const FName SessionName)
void SetSessionServerCheckPollNextPollTime (const FUniqueNetIdPtr &SearchingPlayerId, const FName SessionName)
void StopSessionServerCheckPoll (const FUniqueNetIdPtr &SearchingPlayerId, const FName SessionName)
void OnSessionServerCheckGetSession (int32 LocalUserNum, bool bWasSuccessful, const FOnlineSessionSearchResult &OnlineSessionSearchResult)
void SendSessionInviteNotif (int32 LocalUserNum, const FString &SessionId) const
void StartSessionInviteCheckPoll (const FUniqueNetIdPtr &SearchingPlayerId, const FString &SessionId)
void SetSessionInviteCheckPollNextPollTime (const FUniqueNetIdPtr &SearchingPlayerId, const FString &SessionId)
void StopSessionInviteCheckPoll (const FUniqueNetIdPtr &SearchingPlayerId, const FString &SessionId)
void OnSessionInviteCheckGetSession (int32 LocalUserNum, bool bWasSuccessful, const FOnlineSessionSearchResult &OnlineSearchResult)
void InitMetricExporter (const FString &Address, uint16 Port, uint16 IntervalSeconds=60)
void SetMetricLabel (const FString &Key, const FString &Value)
void EnqueueMetric (const FString &Key, double Value)
void EnqueueMetric (const FString &Key, int32 Value)
void EnqueueMetric (const FString &Key, const FString &Value)
void SetOptionalMetricsEnabled (bool Enable)
void SetMetricCollector (const TSharedPtr< AccelByte::IAccelByteStatsDMetricCollector > &Collector)
void InitializePlayerAttributes (const FUniqueNetId &LocalPlayerId)
FAccelByteModelsV2PlayerAttributes * GetInternalPlayerAttributes (const FUniqueNetId &LocalPlayerId)
void StorePlayerAttributes (const FUniqueNetId &LocalPlayerId, FAccelByteModelsV2PlayerAttributes &&Attributes)
bool ServerQueryGameSessions (const FAccelByteModelsV2ServerQueryGameSessionsRequest &Request, int64 Offset=0, int64 Limit=20)
 Query game sessions from a server, listen for OnServerQueryGameSessionsComplete delegate for the result.
bool ServerQueryPartySessions (const FAccelByteModelsV2QueryPartiesRequest &Request, int64 Offset=0, int64 Limit=20)
 Query party sessions from a server, listen for OnServerQueryPartySessionsComplete delegate for the result.
void AddCanceledTicketId (const FString &TicketId)
bool IsServerUseAMS () const
 Get whether Server is using AMS or not.
bool SendDSSessionReady ()
 Used for sending dedicated server ready to session service. This method used by the DS if dsManualSetReady flag enabled in session template to indicate that this DS ready to receive connection.
void HandleUserLogoutCleanUp (const FUniqueNetId &LocalUserId)
 Clean up data related to a user when that user has logged out. Called internally by FOnlineIdentityAccelByte::OnLogout.

Static Public Member Functions

static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineSessionV2AccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromSubsystem (const FOnlineSubsystemAccelByte *Subsystem, TSharedPtr< FOnlineSessionV2AccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromWorld (const UWorld *World, TSharedPtr< FOnlineSessionV2AccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static TArray< FString > ExtractExcludedSessionFromPartySessionStorage (FOnlineSessionSearchAccelByte &SearchHandle, const FAccelByteModelsV2PartySessionStorage &Storage)

Public Attributes

PACKAGE_SCOPE : void UnbindLobbyMulticastDelegate()
TArray< FOnlineRestoredSessionAccelByteRestoredSessions
TArray< FOnlineSessionInviteAccelByteSessionInvites
TSharedPtr< FOnlineSessionSearchAccelByteCurrentMatchmakingSearchHandle {nullptr}
FOnlineSessionSettings CurrentMatchmakingSessionSettings {}
FDateTime NextMatchmakingDetailPollTime {0}
FCriticalSection SessionServerCheckTimesLock
TArray< FSessionServerCheckPollItemSessionServerCheckPollTimes
FCriticalSection SessionInviteCheckTimesLock
TArray< FSessionInviteCheckPollItemSessionInviteCheckPollTimes
FOnSingleSessionResultCompleteDelegate OnSessionInviteCheckGetSessionDelegate
FAccelBytePartySessionStorageLocalUserManager PartySessionStorageLocalUserManager {}

Static Public Attributes

static TCHAR const * ServerSessionIdEnvironmentVariable = TEXT("NOMAD_META_session_id")

Protected Member Functions

FNamedOnlineSession * AddNamedSession (FName SessionName, const FOnlineSessionSettings &SessionSettings) override
FNamedOnlineSession * AddNamedSession (FName SessionName, const FOnlineSession &Session) override

Friends

class FOnlineAsyncTaskAccelByteGetServerClaimedV2Session

Member Function Documentation

◆ AcceptBackfillProposal()

bool FOnlineSessionV2AccelByte::AcceptBackfillProposal ( const FName & SessionName,
const FAccelByteModelsV2MatchmakingBackfillProposalNotif & Proposal,
bool bStopBackfilling,
const FOnAcceptBackfillProposalComplete & Delegate,
FAccelByteModelsV2MatchmakingBackfillAcceptanceOptionalParam const & OptionalParameter = {} )

Accept a backfill proposal from matchmaking. Which will then invite the players backfilled to your session.

◆ AddBuiltInGameSessionSettingsToSessionSettings()

void FOnlineSessionV2AccelByte::AddBuiltInGameSessionSettingsToSessionSettings ( FOnlineSessionSettings & OutSettings,
const FAccelByteModelsV2GameSession & GameSession )

Fill out SessionSettings field of a game session with constants from the backend data

◆ AddBuiltInPartySessionSettingsToSessionSettings()

void FOnlineSessionV2AccelByte::AddBuiltInPartySessionSettingsToSessionSettings ( FOnlineSessionSettings & OutSettings,
const FAccelByteModelsV2PartySession & PartySession )

Fill out SessionSettings field of a party session with constants from the backend data

◆ AddCanceledTicketId()

void FOnlineSessionV2AccelByte::AddCanceledTicketId ( const FString & TicketId)

Add a canceled ticket ID to this interface instance for tracking

◆ CheckMatchmakingProgress()

void FOnlineSessionV2AccelByte::CheckMatchmakingProgress ( )

Check matchmaking progress in case matchmaking found notifications is not received in a timely manner.

◆ CheckSessionInviteAfterMatchFound()

void FOnlineSessionV2AccelByte::CheckSessionInviteAfterMatchFound ( )

Check session's invite when notification is not received in a timely manner after match found is notified.

◆ CheckSessionServerProgress()

void FOnlineSessionV2AccelByte::CheckSessionServerProgress ( )

Check session's dedicated server readiness when notification is not received in a timely manner.

◆ ConnectToDSHub()

void FOnlineSessionV2AccelByte::ConnectToDSHub ( const FString & ServerName)

Connect a server to the DS hub, as well as register delegates internally for session management.

Parameters
ServerNameName of the server that is connecting to the DS hub

◆ ConnectToJoinedP2PSession()

void FOnlineSessionV2AccelByte::ConnectToJoinedP2PSession ( FName SessionName,
EOnlineSessionP2PConnectedAction Action )

Attempt to connect to a P2P session

◆ ConnectToThirdPartyDSHub()

void FOnlineSessionV2AccelByte::ConnectToThirdPartyDSHub ( const FString & ServerName)

Connect to the DSHub websocket, as well as register internal callbacks relating to DSHub events. Not intended to be called for AMS usage, RegisterServer already does this in the background as part of its logic.

Parameters
ServerNameString representing the name of the server that we are connecting under, used to route messages in the DSHub

◆ ConstructGameSessionFromBackendSessionModel()

bool FOnlineSessionV2AccelByte::ConstructGameSessionFromBackendSessionModel ( const FAccelByteModelsV2GameSession & BackendSession,
FOnlineSession & OutResult )

Construct a new session search result instance from a backend representation of a game session

◆ ConstructPartySessionFromBackendSessionModel()

bool FOnlineSessionV2AccelByte::ConstructPartySessionFromBackendSessionModel ( const FAccelByteModelsV2PartySession & BackendSession,
FOnlineSession & OutResult )

Construct a new session search result instance from a backend representation of a party session

◆ ConvertSearchParamsToJsonObject()

TSharedRef< FJsonObject > FOnlineSessionV2AccelByte::ConvertSearchParamsToJsonObject ( const FOnlineSearchSettings & Params) const

Convert a session search parameters into a json object that can be used to fill match ticket attributes

◆ ConvertSessionSettingArrayToJson() [1/2]

TArray< TSharedPtr< FJsonValue > > FOnlineSessionV2AccelByte::ConvertSessionSettingArrayToJson ( const TArray< double > & Array) const

Convert an array of doubles to an array of FJsonValues

Parameters
ArrayThe source array to convert
Returns
An array of shared pointers to FJsonValues

◆ ConvertSessionSettingArrayToJson() [2/2]

TArray< TSharedPtr< FJsonValue > > FOnlineSessionV2AccelByte::ConvertSessionSettingArrayToJson ( const TArray< FString > & Array) const

Convert an array of FStrings to an array of FJsonValues

Parameters
ArrayThe source array to convert
Returns
An array of shared pointers to FJsonValues

◆ ConvertSessionSettingJsonToArray() [1/2]

bool FOnlineSessionV2AccelByte::ConvertSessionSettingJsonToArray ( const TArray< TSharedPtr< FJsonValue > > * JsonArray,
TArray< double > & OutArray ) const

Convert a JSON array into a primitive array of doubles

Parameters
JsonArrayThe array to convert, pulled out of a JSON object
OutArrayThe array of doubles to write to
Returns
A boolean indicating whether the conversion was successful

◆ ConvertSessionSettingJsonToArray() [2/2]

bool FOnlineSessionV2AccelByte::ConvertSessionSettingJsonToArray ( const TArray< TSharedPtr< FJsonValue > > * JsonArray,
TArray< FString > & OutArray ) const

Convert a JSON array into a primitive array of FStrings

Parameters
JsonArrayThe array to convert, pulled out of a JSON object
OutArrayThe array of strings to write to
Returns
A boolean indicating whether the conversion was successful

◆ ConvertSessionSettingsToJsonObject()

TSharedRef< FJsonObject > FOnlineSessionV2AccelByte::ConvertSessionSettingsToJsonObject ( const FOnlineSessionSettings & Settings) const

Convert a session settings object into a JSON object that can be used with create or update requests for sessions.

◆ CreateBackfillTicket() [1/2]

bool FOnlineSessionV2AccelByte::CreateBackfillTicket ( const FName & SessionName,
const FOnCreateBackfillTicketComplete & Delegate )

Create a backfill ticket for the session provided. This will queue your session to be backfilled with users from matchmaking.

◆ CreateBackfillTicket() [2/2]

bool FOnlineSessionV2AccelByte::CreateBackfillTicket ( const FName & SessionName,
const FString & MatchPool,
const FOnCreateBackfillTicketComplete & Delegate )

Create a backfill ticket for the session provided. This will queue your session to be backfilled with users from matchmaking in the match pool specified.

◆ DEFINE_ONLINE_DELEGATE() [1/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE ( OnInviteListUpdated )

Delegate fired when our local list of invites has been updated

◆ DEFINE_ONLINE_DELEGATE() [2/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE ( OnMatchmakingCanceled )

Delegate fired when matchmaking ticket has been canceled.

◆ DEFINE_ONLINE_DELEGATE() [3/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE ( OnMatchmakingStarted )

Delegate fired when matchmaking has started

◆ DEFINE_ONLINE_DELEGATE_FOUR_PARAM()

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_FOUR_PARAM ( OnSendSessionInviteComplete ,
const FUniqueNetId & ,
FName ,
bool ,
const FUniqueNetId &  )

Delegate fired when a local player has sent an invite to a player

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [1/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnAMSMassiveOutageEvent ,
const AccelByte::FMassiveOutageInfo &  )

Called when the ams websocket has been disconnected for longer than usual and can't be reconnected yet

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [2/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnAMSReconnectAttempted ,
const AccelByte::FReconnectAttemptInfo &  )

Called when the disconnected ams websocket trying to establish the connection again

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [3/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnDSHubFailedToConnect ,
const FString &  )

Called when the DSHub websocket connection failed to established

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [4/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnDSHubMassiveOutageEvent ,
const AccelByte::FMassiveOutageInfo &  )

Called when the DSHub websocket has been disconnected for longer than usual and can't be reconnected yet

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [5/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnDSHubReconnectAttempted ,
const AccelByte::FReconnectAttemptInfo &  )

Called when the disconnected DSHub websocket trying to establish the connection again

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [6/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnBackfillProposalReceived ,
FAccelByteModelsV2MatchmakingBackfillProposalNotif  )

Delegate fired when the game server receives a backfill proposal from matchmaking. Use AcceptBackfillProposal and RejectBackfillProposal to act on the proposal.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [7/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnKickedFromSession ,
FName  )

Delegate fired when a local player has been kicked from a session. Fired before session is destroyed in case there is a need to do any extra clean up.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [8/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnMatchmakingCanceledReason ,
const FOnlineErrorAccelByte &  )

Delegate fired when matchmaking ticket has been canceled with reason as parameter.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [9/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnMatchmakingExpired ,
TSharedPtr< FOnlineSessionSearchAccelByte >  )

Delegate fired when matchmaking ticket has expired.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [10/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSendDSSessionReadyComplete ,
const FOnlineError &  )

Delegate fired when send server ready completed.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [11/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnServerReceivedSession ,
FName  )

Delegate fired when we have retrieved information on the session that our server is claimed by on the backend.

Parameters
SessionNamethe name that our server session is stored under

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [12/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSessionInvitesChanged ,
FName  )

Delegate fired when a session's invited members list changes.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [13/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSessionLeaderStorageUpdateReceived ,
FName  )

Delegate broadcast when another game session member promoted to be a game session leader. Delegate fired when session leader storage has received an update

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [14/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSessionRemoved ,
FName  )

Delegate fired when server query party sessions complete Delegate fired when get my active match ticket complete, SearchHandle will be invalid if no active ticket is found. Delegate fired when get match ticket details complete. Delegate broadcast when a session that the player is in locally has been removed on the backend. Gives the game an opportunity to clean up state.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [15/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSessionServerUpdate ,
FName  )

Delegate fired when the server info for the session referenced changes. Basically is a signal that the server is ready to be traveled to.

Parameters
SessionNameName of the session that has had server information change.

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [16/16]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnSessionUpdateReceived ,
FName  )

Delegate fired when a local player has received an update from the backend to a session

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [1/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnUpdateSessionMemberStorageComplete ,
FName ,
const FUniqueNetId & ,
const FOnlineError &  )

Delegate fired when a session member's storage has received an update

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [2/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnV2SessionInviteReceived ,
const FUniqueNetId & ,
const FUniqueNetId & ,
const FOnlineSessionInviteAccelByte &  )

Delegate fired when we get a session invite from another player. Includes an AccelByte invite structure to allow for rejecting the invite.

Parameters
UserIdID of the local user that received the invite
FromIdID of the remote user that sent the invite
InviteInvite structure that can be used to either accept or reject the invite

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [3/3]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnV2SessionInviteTimeoutReceived ,
const FUniqueNetId & ,
const FOnlineSessionInviteAccelByte & ,
EAccelByteV2SessionType  )

Delegate fired when we get a game session or party invite from another player is time out. Includes an AccelByte invite structure to allow for discarding the invitation.

Parameters
UserIdID of the local user that received the timeout invitation notif
InviteInvite structure that can be used to either accept or reject the invite
SessionTypeType of invitation that has been time out [GameSession or PartySession]

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [1/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( AccelByteOnConnectAMSComplete ,
bool ,
const FOnlineErrorAccelByte &  )

Called when the server connected to ams

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
ErrorInformation about the error condition

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [2/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnBackfillTicketExpiredReceived ,
FName ,
FAccelByteModelsV2MatchmakingBackfillTicketExpireNotif  )

Delegate fired when the game server receives a backfill ticket expired from matchmaking.

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [3/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnPlayerAttributesInitialized ,
const FUniqueNetId & ,
bool  )

Delegate fired when a player's attributes have been initialized. Should be fired once toward the end of login.

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [4/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnQueryAllInvitesComplete ,
bool ,
const FUniqueNetId &  )

Delegate fired when we have finished restoring all invites from the backend to the local interface.

Parameters
bWasSuccessfulwhether the call to get all invites was a success
PlayerIdID of the player who had their invites restored

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [5/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSessionInviteRejected ,
FName ,
const FUniqueNetId &  )

Delegate fired when a local player rejects invite

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [6/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSessionMemberStorageUpdateReceived ,
FName ,
const FUniqueNetId &  )

Delegate fired when a session member's storage has received an update

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [7/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSessionServerError ,
FName ,
const FString &  )

Delegate fired when session failed to get a server.

Parameters
SessionNameName of the session.
ErrorMessageMessage of the error

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [8/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSessionUpdateConflictError ,
FName ,
FOnlineSessionSettings  )

Delegate fired when a session update fails due to a version mismatch

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [9/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSessionUpdateRequestComplete ,
FName ,
bool  )

Delegate fired when a session update request is completed. Together with the above OnSessionUpdateReceived delegate, the developer can separately listen to both update notifications and update request completion, without breaking changes to the regular OnUpdateSessionComplete delegate, which is used to handle both cases

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [10/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnUpdatePartySessionStorageComplete ,
FName ,
const FOnlineError &  )

Delegate fired when party session storage has received an update

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [11/11]

FOnlineSessionV2AccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnUpdateSessionLeaderStorageComplete ,
FName ,
const FOnlineError &  )

Delegate fired when session leader storage has received an update

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM()

FOnlineSessionV2AccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnReconnectedRefreshSession ,
bool ,
const TArray< FName > &  )

Delegate broadcasted when the player refreshes the active session after their websocket connection has been reconnected.

◆ DeleteBackfillTicket()

bool FOnlineSessionV2AccelByte::DeleteBackfillTicket ( const FName & SessionName,
const FOnDeleteBackfillTicketComplete & Delegate )

Delete a backfill ticket associated with the session provided. This will stop backfilling players from matchmaking for the session.

◆ DisconnectFromAMS()

void FOnlineSessionV2AccelByte::DisconnectFromAMS ( )

Disconnect a server from the AMS, unregistering any delegates bound.

◆ DisconnectFromDSHub()

void FOnlineSessionV2AccelByte::DisconnectFromDSHub ( )

Disconnect a server from the DS hub, unregistering any delegates bound.

◆ EnqueueMetric() [1/3]

void FOnlineSessionV2AccelByte::EnqueueMetric ( const FString & Key,
const FString & Value )

Enqueue Metric

Parameters
KeyThe key of the metric
ValueString value of the metric

◆ EnqueueMetric() [2/3]

void FOnlineSessionV2AccelByte::EnqueueMetric ( const FString & Key,
double Value )

Enqueue Metric

Parameters
KeyThe key of the metric
ValueFloating number value of the metric

◆ EnqueueMetric() [3/3]

void FOnlineSessionV2AccelByte::EnqueueMetric ( const FString & Key,
int32 Value )

Enqueue Metric

Parameters
KeyThe key of the metric
ValueInteger value of the metric

◆ ExtractExcludedSessionFromPartySessionStorage()

TArray< FString > FOnlineSessionV2AccelByte::ExtractExcludedSessionFromPartySessionStorage ( FOnlineSessionSearchAccelByte & SearchHandle,
const FAccelByteModelsV2PartySessionStorage & Storage )
static

Try to obtain party member's past session IDs from the reserved field in the Party Session Storage. Static function to make it testable.

◆ FinalizeCreateGameSession()

void FOnlineSessionV2AccelByte::FinalizeCreateGameSession ( const FName & SessionName,
const FAccelByteModelsV2GameSession & BackendSessionInfo )

Create a new named game session instance based on the passed in settings and backend session structure

◆ FinalizeCreatePartySession()

void FOnlineSessionV2AccelByte::FinalizeCreatePartySession ( const FName & SessionName,
const FAccelByteModelsV2PartySession & BackendSessionInfo )

Create a new named party session instance based on the passed in settings and backend session structure

◆ FindPlayerMemberSettings() [1/2]

bool FOnlineSessionV2AccelByte::FindPlayerMemberSettings ( FOnlineSessionSettings & InSettings,
const FUniqueNetId & PlayerId,
FSessionSettings & OutMemberSettings ) const

Attempt to find a specific player's member settings entry within a FOnlineSessionSettings instance.

Parameters
InSettingsSettings instance that we are attempting to find within
PlayerIdID of the player that you are attempting to find a settings entry for
OutMemberSettingsSettings for the player that were found
Returns
bool true if found, false otherwise

◆ FindPlayerMemberSettings() [2/2]

bool FOnlineSessionV2AccelByte::FindPlayerMemberSettings ( FOnlineSessionSettings & InSettings,
const FUniqueNetId & PlayerId,
TSharedPtr< FSessionSettings > & OutMemberSettings ) const

Attempt to find a specific player's member settings entry within a FOnlineSessionSettings instance.

Parameters
InSettingsSettings instance that we are attempting to find within
PlayerIdID of the player that you are attempting to find a settings entry for
OutMemberSettingsSettings for the player that were found
Returns
bool true if found, false otherwise

◆ FindSessionByStringId() [1/2]

bool FOnlineSessionV2AccelByte::FindSessionByStringId ( const FUniqueNetId & SearchingUserId,
const EAccelByteV2SessionType & SessionType,
const FString & SessionId,
const FOnSingleSessionResultCompleteDelegate & CompletionDelegate )

Find a game or party session by its ID.

Parameters
SearchingUserIdID of the user to make the find session request as
SessionTypeType of session to search for
SessionIdString representation of the session ID being searched for
CompletionDelegateDelegate fired after the operation to find the given session completes
Returns
true if operation to find session has started, false otherwise

◆ FindSessionByStringId() [2/2]

bool FOnlineSessionV2AccelByte::FindSessionByStringId ( int32 LocalUserNum,
const EAccelByteV2SessionType & SessionType,
const FString & SessionId,
const FOnSingleSessionResultCompleteDelegate & CompletionDelegate )

Find a game or party session by its ID.

Parameters
LocalUserNumIndex of user that is attempting
SessionTypeType of session to search for
SessionIdString representation of the session ID being searched for
CompletionDelegateDelegate fired after the operation to find the given session completes
Returns
true if operation to find session has started, false otherwise

◆ GenerateNewGameCode()

bool FOnlineSessionV2AccelByte::GenerateNewGameCode ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FOnGenerateNewGameCodeComplete & Delegate )

Generate a new Game code for this game session. Once updated, this new generated code will be reflected in the SETTING_PARTYSESSION_CODE session setting.

◆ GenerateNewPartyCode()

bool FOnlineSessionV2AccelByte::GenerateNewPartyCode ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FOnGenerateNewPartyCodeComplete & Delegate )

Generate a new party code for this party session. Once updated, this new generated code will be reflected in the SETTING_PARTYSESSION_CODE session setting.

◆ GetAllGameInvites()

TArray< FOnlineSessionInviteAccelByte > FOnlineSessionV2AccelByte::GetAllGameInvites ( ) const

Get every pending game session invite that has not yet been acted on

◆ GetAllInvites()

TArray< FOnlineSessionInviteAccelByte > FOnlineSessionV2AccelByte::GetAllInvites ( ) const

Get every pending invite that has not yet been acted on

◆ GetAllPartyInvites()

TArray< FOnlineSessionInviteAccelByte > FOnlineSessionV2AccelByte::GetAllPartyInvites ( ) const

Get every pending party invite that has not yet been acted on

◆ GetAllRestoredGameSessions()

TArray< FOnlineRestoredSessionAccelByte > FOnlineSessionV2AccelByte::GetAllRestoredGameSessions ( ) const

Grab every restored game session from our cache

◆ GetAllRestoredPartySessions()

TArray< FOnlineRestoredSessionAccelByte > FOnlineSessionV2AccelByte::GetAllRestoredPartySessions ( ) const

Grab every restored party session from our cache

◆ GetAllRestoredSessions()

TArray< FOnlineRestoredSessionAccelByte > FOnlineSessionV2AccelByte::GetAllRestoredSessions ( ) const

Grab every restored session from our cache

◆ GetCurrentMatchmakingSearchHandle()

TSharedPtr< FOnlineSessionSearchAccelByte > FOnlineSessionV2AccelByte::GetCurrentMatchmakingSearchHandle ( ) const

Get the current session search handle that we are using for matchmaking.

◆ GetFromSubsystem()

bool FOnlineSessionV2AccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineSessionV2AccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem passed in.

Parameters
SubsystemSubsystem instance that we wish to get this interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetFromWorld()

bool FOnlineSessionV2AccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineSessionV2AccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem associated with the world passed in.

Parameters
WorldWorld instance that we wish to get the interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetInternalPlayerAttributes()

FAccelByteModelsV2PlayerAttributes * FOnlineSessionV2AccelByte::GetInternalPlayerAttributes ( const FUniqueNetId & LocalPlayerId)

Get the internal model for a player's attributes.

Parameters
LocalPlayerIdID of the player that we want to get the internal attributes model for

◆ GetJoinabilityAsString()

FString FOnlineSessionV2AccelByte::GetJoinabilityAsString ( const EAccelByteV2SessionJoinability & Joinability)

Get a string representation of the joinability enum passed in

◆ GetJoinabilityFromString()

EAccelByteV2SessionJoinability FOnlineSessionV2AccelByte::GetJoinabilityFromString ( const FString & JoinabilityStr) const

Get an AccelByte joinability enum from a string value

◆ GetJoinabiltyFromSessionSettings()

EAccelByteV2SessionJoinability FOnlineSessionV2AccelByte::GetJoinabiltyFromSessionSettings ( const FOnlineSessionSettings & Settings) const

Figure out the AccelByte joinability status of a session from its settings

◆ GetLocalServerName()

bool FOnlineSessionV2AccelByte::GetLocalServerName ( FString & OutServerName) const

Attempt to get the name of the local server to register with

◆ GetMatchTicketCheckEnabled()

bool FOnlineSessionV2AccelByte::GetMatchTicketCheckEnabled ( ) const

Get enabled state of match ticket status check polling.

Returns
true if polling enabled.

◆ GetMatchTicketCheckInitialDelay()

int32 FOnlineSessionV2AccelByte::GetMatchTicketCheckInitialDelay ( ) const

Get match ticket status check delay after matchmaking first started.

Returns
initial delay in sec

◆ GetMatchTicketCheckPollInterval()

int32 FOnlineSessionV2AccelByte::GetMatchTicketCheckPollInterval ( ) const

Get match ticket status check delay polling if the ticket state still waiting for match after first check.

Returns
Interval delay time in seconds

◆ GetMyActiveMatchTicket()

bool FOnlineSessionV2AccelByte::GetMyActiveMatchTicket ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FString & MatchPool )

Query the backend for active matchmaking tickets, Listen to OnGetMyActiveMatchTicketComplete for the result. if active ticket is found, it will fill CurrentMatchmakingSearchHandle so ticket can be cancelled with CancelMatchmaking call.

Parameters
LocalUserIdID of the player that you are attempting to find active match ticket for
SessionNameSession name we are searching active match ticket for
MatchPoolMatch pool we are going to search active ticket for
Returns
true if query request is sent, false otherwise

◆ GetPartySession()

FNamedOnlineSession * FOnlineSessionV2AccelByte::GetPartySession ( ) const

Get the party session instance that the player is in, or nullptr if they are not in one

◆ GetPlayerAttributes()

FOnlineSessionV2AccelBytePlayerAttributes FOnlineSessionV2AccelByte::GetPlayerAttributes ( const FUniqueNetId & LocalPlayerId)

Get attributes for the given player. To update the stored values in the session backend service, call UpdatePlayerAttributes.

Parameters
LocalPlayerIdID of the local player that attributes should be returned for

◆ GetRegionList()

TArray< FString > FOnlineSessionV2AccelByte::GetRegionList ( const FUniqueNetId & LocalPlayerId) const

Get the list of regions that you are able to spin up a server in, sorted by latency to the player.

◆ GetServerClaimedSession()

bool FOnlineSessionV2AccelByte::GetServerClaimedSession ( FName SessionName,
const FString & SessionId )

Attempt to get the session that is currently associated with this dedicated server. Will create a new game session under NAME_GameSession for the developer to interface with.

◆ GetServerLocalIp()

bool FOnlineSessionV2AccelByte::GetServerLocalIp ( FString & OutIp) const

Attempt to get the currently bound local address for a dedicated server.

◆ GetServerPort()

bool FOnlineSessionV2AccelByte::GetServerPort ( int32 & OutPort,
bool bIsLocal = false ) const

Attempt to get the currently bound port for a dedicated server.

◆ GetServerTypeAsString()

FString FOnlineSessionV2AccelByte::GetServerTypeAsString ( const EAccelByteV2SessionConfigurationServerType & ServerType) const

Get an AccelByte joinability enum from a string value

◆ GetServerTypeFromString()

EAccelByteV2SessionConfigurationServerType FOnlineSessionV2AccelByte::GetServerTypeFromString ( const FString & ServerType) const

Get an AccelByte joinability enum from a string value

◆ GetSessionInviteCheckPollEnabled()

bool FOnlineSessionV2AccelByte::GetSessionInviteCheckPollEnabled ( ) const

Get enabled state of session invite check polling after match is found.

Returns
true if polling is enabled

◆ GetSessionInviteCheckPollInitialDelay()

int32 FOnlineSessionV2AccelByte::GetSessionInviteCheckPollInitialDelay ( ) const

Get session invite check initial delay after match found notification is received.

Returns
Initial delay in seconds

◆ GetSessionInviteCheckPollInterval()

int32 FOnlineSessionV2AccelByte::GetSessionInviteCheckPollInterval ( ) const

Get session invite check interval if previous call failed.

Returns
Interval delay in seconds

◆ GetSessionLeaderId()

FUniqueNetIdPtr FOnlineSessionV2AccelByte::GetSessionLeaderId ( const FNamedOnlineSession * Session) const

Try and get the ID of the user that is leader of this particular session. Only works with party sessions.

◆ GetSessionMaxPlayerCount() [1/2]

int32 FOnlineSessionV2AccelByte::GetSessionMaxPlayerCount ( const FName & SessionName) const

Get the maximum amount of players allowed in the session specified.

◆ GetSessionMaxPlayerCount() [2/2]

int32 FOnlineSessionV2AccelByte::GetSessionMaxPlayerCount ( const FOnlineSession & Session) const

Get the maximum amount of players allowed in the session specified.

◆ GetSessionPlayerCount() [1/2]

int32 FOnlineSessionV2AccelByte::GetSessionPlayerCount ( const FName & SessionName) const

Get the current amount of players in the session specified.

◆ GetSessionPlayerCount() [2/2]

int32 FOnlineSessionV2AccelByte::GetSessionPlayerCount ( const FOnlineSession & Session) const

Get the current amount of players in the session specified.

◆ GetSessionServerCheckPollEnabled()

bool FOnlineSessionV2AccelByte::GetSessionServerCheckPollEnabled ( ) const

Get enabled state of session server check polling

Returns
true if polling is enabled

◆ GetSessionServerCheckPollInitialDelay()

int32 FOnlineSessionV2AccelByte::GetSessionServerCheckPollInitialDelay ( ) const

Get session server status check after joining a session.

Returns
Initial delay in seconds

◆ GetSessionServerCheckPollInterval()

int32 FOnlineSessionV2AccelByte::GetSessionServerCheckPollInterval ( ) const

Get session server status check polling interval if the previous attempt still waiting for server.

Returns
Interval delay time in seconds

◆ GetSessionTypeByName()

EAccelByteV2SessionType FOnlineSessionV2AccelByte::GetSessionTypeByName ( const FName & SessionName)

Get session type from session by its name

◆ GetSessionTypeFromSettings()

EAccelByteV2SessionType FOnlineSessionV2AccelByte::GetSessionTypeFromSettings ( const FOnlineSessionSettings & Settings) const

Get an AccelByte session type from a session settings object

◆ GetSessionTypeFromString()

EAccelByteV2SessionType FOnlineSessionV2AccelByte::GetSessionTypeFromString ( const FString & SessionTypeStr) const

Get an AccelByte session type from a string value

◆ HandleUserLogoutCleanUp()

void FOnlineSessionV2AccelByte::HandleUserLogoutCleanUp ( const FUniqueNetId & LocalUserId)

Clean up data related to a user when that user has logged out. Called internally by FOnlineIdentityAccelByte::OnLogout.

Parameters
LocalUserIdID of the user that has logged out that we want to clean up after

◆ Init()

void FOnlineSessionV2AccelByte::Init ( )

Initializer method for this interface. Used to define internal delegate handlers that don't require user identifiers.

◆ InitializePlayerAttributes()

void FOnlineSessionV2AccelByte::InitializePlayerAttributes ( const FUniqueNetId & LocalPlayerId)

Makes a call to grab the most recent stored player attributes from the session service, and updates them with the current platform. Intended to be called at the end of the login process.

Parameters
LocalPlayerIdID of the player that we want to initialize attributes for

◆ InitMetricExporter()

void FOnlineSessionV2AccelByte::InitMetricExporter ( const FString & Address,
uint16 Port,
uint16 IntervalSeconds = 60 )

Initialize Metric Exporter.

Parameters
AddressStatsD IPv4 address
PortStatsD port
IntervalSecondsInterval of exporting metric to StatsD

◆ IsInPartySession()

bool FOnlineSessionV2AccelByte::IsInPartySession ( ) const

Returns whether the local user is in a party session or not

◆ IsPlayerP2PHost()

bool FOnlineSessionV2AccelByte::IsPlayerP2PHost ( const FUniqueNetId & LocalUserId,
FName SessionName )

Check if the player is the host of the P2P matchmaking match

◆ IsServerUseAMS()

bool FOnlineSessionV2AccelByte::IsServerUseAMS ( ) const

Get whether Server is using AMS or not.

Returns
true if Server is using AMS

◆ JoinSession()

bool FOnlineSessionV2AccelByte::JoinSession ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FString & Code,
EAccelByteV2SessionType SessionType = EAccelByteV2SessionType::PartySession )

Join a session using a session code. This code is intended to be generated either by the leader or DSes, on session create, and passed to players to join the session without invites. To access an already generated code, grab the SETTING_PARTYSESSION_CODE setting out of a party session's settings.

◆ KickPlayer()

bool FOnlineSessionV2AccelByte::KickPlayer ( const FUniqueNetId & LocalUserId,
const FName & SessionName,
const FUniqueNetId & PlayerIdToKick,
const FOnKickPlayerComplete & Delegate = FOnKickPlayerComplete() )

Kick a member of the session out of the session.

◆ LeaveRestoredSession()

bool FOnlineSessionV2AccelByte::LeaveRestoredSession ( const FUniqueNetId & LocalUserId,
const FOnlineRestoredSessionAccelByte & SessionToLeave,
const FOnLeaveSessionComplete & Delegate )

Leave a restored session on the backend. For party sessions, this will allow you to create a new party instance once this call is finished. Though, this should also be done for game sessions that will not be rejoined.

◆ LeaveSession()

bool FOnlineSessionV2AccelByte::LeaveSession ( const FUniqueNetId & LocalUserId,
const EAccelByteV2SessionType & SessionType,
const FString & SessionId,
const FOnLeaveSessionComplete & Delegate = FOnLeaveSessionComplete(),
bool bUserKicked = false )

Send a request on the backend to leave a session by its ID. Used internally by LeaveRestoredSession and DestroySession to notify backend that we want to leave the session referenced.

Parameters
LocalUserIdID of the user that is leaving the session provided
SessionIdID of the session that we want to leave
DelegateDelegate fired once the leave session call completes
bUserKickedFlag indicating that leave session is called from OnKickedFromGameSession or OnKickedFromPartySession. This only used internally by FOnlineSessionV2AccelByte. For normal use from game client or DS leave it to false.
Returns
bool true if leave session task was spawned, false otherwise

◆ OnMatchTicketCheckGetSessionInfoById()

void FOnlineSessionV2AccelByte::OnMatchTicketCheckGetSessionInfoById ( int32 LocalUserNum,
bool bWasSuccessful,
const FOnlineSessionSearchResult & SessionSearchResult )

Get session info from match ticket and spoof match notification

◆ PromoteGameSessionLeader()

bool FOnlineSessionV2AccelByte::PromoteGameSessionLeader ( const FUniqueNetId & LocalUserId,
const FName & SessionName,
const FUniqueNetId & PlayerIdToPromote )

Promote a member of the game session to leader

Parameters
LocalUserIdID of the user that we are restoring sessions for
SessionNameName of the game session
PlayerIdToPromoteID of the player to be promoted as game session leader

◆ PromotePartySessionLeader()

bool FOnlineSessionV2AccelByte::PromotePartySessionLeader ( const FUniqueNetId & LocalUserId,
const FName & SessionName,
const FUniqueNetId & PlayerIdToPromote,
const FOnPromotePartySessionLeaderComplete & Delegate = FOnPromotePartySessionLeaderComplete() )

Promote a member of the party session to leader

Parameters
LocalUserIdID of the user that we are restoring sessions for
DelegateHandler fired after the restore call either succeeds or fails

◆ QueryAllInvites()

bool FOnlineSessionV2AccelByte::QueryAllInvites ( const FUniqueNetId & PlayerId)

Query for any pending invites that the player passed in has yet to respond to.

◆ ReadMemberSettingsFromJsonObject()

bool FOnlineSessionV2AccelByte::ReadMemberSettingsFromJsonObject ( FSessionSettings & OutMemberSettings,
const TSharedRef< FJsonObject > & Object ) const

Read a JSON object into a session member settings instance

◆ ReadSessionSettingsFromSessionModel()

bool FOnlineSessionV2AccelByte::ReadSessionSettingsFromSessionModel ( FOnlineSessionSettings & OutSettings,
const FAccelByteModelsV2BaseSession & Session ) const

Read a base session model into a session settings instance

◆ RefreshActiveSessions()

bool FOnlineSessionV2AccelByte::RefreshActiveSessions ( const FOnRefreshActiveSessionsComplete & Delegate)

Refresh all active session locally with backend

Parameters
DelegateFired when finish refreshing data for all the session
Returns

◆ RefreshActiveSessionsV2AfterReconnected()

bool FOnlineSessionV2AccelByte::RefreshActiveSessionsV2AfterReconnected ( int32 LocalUserNum)

Refresh all active session locally with backend for specific localUserNum. WARNING: This function is automatically triggered after successfully reconnected. Eventually after obtain the response, it automatically triggers the OnReconnectedRefreshSession delegate from this Session Interface.

Returns
Whether success or not to execute the function.

◆ RefreshSession()

bool FOnlineSessionV2AccelByte::RefreshSession ( const FName & SessionName,
const FOnRefreshSessionComplete & Delegate )

Method to manually refresh a session's data from the backend. Use to reconcile state between client and backend if notifications are missed or other issues arise.

Parameters
SessionNameName of the session that we want to refresh data for
DelegateDelegate fired when we finish refreshing data for this session
Returns
true if call was made to refresh session, false otherwise

◆ RegisterServer()

void FOnlineSessionV2AccelByte::RegisterServer ( FName SessionName,
const FOnRegisterServerComplete & Delegate = FOnRegisterServerComplete() )

Register a dedicated server to Armada, either as a local server for testing, or as a managed Armada pod. This will also establish a connection with the DSHub service for session updates.

◆ RegisterSessionNotificationDelegates()

void FOnlineSessionV2AccelByte::RegisterSessionNotificationDelegates ( const FUniqueNetId & PlayerId)

Register notification delegates for the player specified. Will also fire off associated OSS delegates once received.

◆ RejectBackfillProposal()

bool FOnlineSessionV2AccelByte::RejectBackfillProposal ( const FName & SessionName,
const FAccelByteModelsV2MatchmakingBackfillProposalNotif & Proposal,
bool bStopBackfilling,
const FOnRejectBackfillProposalComplete & Delegate )

Reject a backfill proposal from received from matchmaker. Players included in the proposal will not be added to the session.

◆ RejectInvite()

bool FOnlineSessionV2AccelByte::RejectInvite ( const FUniqueNetId & PlayerId,
const FOnlineSessionInviteAccelByte & InvitedSession,
const FOnRejectSessionInviteComplete & Delegate = FOnRejectSessionInviteComplete() )

Rejects any invite that was sent to the player passed in.

◆ RemoveInviteById()

bool FOnlineSessionV2AccelByte::RemoveInviteById ( const FString & SessionIdStr)

Remove an invite from our local list by it's ID. Used when we accept or reject an invite.

Parameters
SessionIdStrSession ID that we are trying to find and remove an invite instance for
Returns
bool true if found and removed, false otherwise

◆ RemoveRestoreSessionById()

bool FOnlineSessionV2AccelByte::RemoveRestoreSessionById ( const FString & SessionIdStr)

Remove a restored session instance by it's ID, if an instance exists

Parameters
SessionIdStrSession ID that we are trying to find and remove a restore session instance for
Returns
bool true if found and removed, false otherwise

◆ ResetServerTimeout()

void FOnlineSessionV2AccelByte::ResetServerTimeout ( )

Reset the dedicated server's timeout

◆ RestoreActiveSessions()

bool FOnlineSessionV2AccelByte::RestoreActiveSessions ( const FUniqueNetId & LocalUserId,
const FOnRestoreActiveSessionsComplete & Delegate = FOnRestoreActiveSessionsComplete() )

Query the backend for any session that the player is marked as active in. This is intended to be used to reconcile state between backend and client. Typically, this means that at login we want to grab all of the sessions where the player is marked as active to figure out if they are still considered to be in any sessions. From here, it is up to you if you want to rejoin the session through JoinSession, or leave the session entirely through the custom LeaveSession call.

Parameters
LocalUserIdID of the user that we are restoring sessions for
DelegateHandler fired after the restore call either succeeds or fails

◆ RevokeGameCode()

bool FOnlineSessionV2AccelByte::RevokeGameCode ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FOnRevokeGameCodeComplete & Delegate )

Revoke the code stored on a game for external joins. Once revoked, the SETTING_PARTYSESSION_CODE session setting will be blanked out and joining this party via code will not be possible.

◆ RevokePartyCode()

bool FOnlineSessionV2AccelByte::RevokePartyCode ( const FUniqueNetId & LocalUserId,
FName SessionName,
const FOnRevokePartyCodeComplete & Delegate )

Revoke the code stored on a party for external joins. Once revoked, the SETTING_PARTYSESSION_CODE session setting will be blanked out and joining this party via code will not be possible.

◆ SendDSSessionReady()

bool FOnlineSessionV2AccelByte::SendDSSessionReady ( )

Used for sending dedicated server ready to session service. This method used by the DS if dsManualSetReady flag enabled in session template to indicate that this DS ready to receive connection.

Returns
true if request sent to the session service

◆ SendReadyToAMS()

void FOnlineSessionV2AccelByte::SendReadyToAMS ( )

Send ready message to AMS

◆ ServerQueryGameSessions()

bool FOnlineSessionV2AccelByte::ServerQueryGameSessions ( const FAccelByteModelsV2ServerQueryGameSessionsRequest & Request,
int64 Offset = 0,
int64 Limit = 20 )

Query game sessions from a server, listen for OnServerQueryGameSessionsComplete delegate for the result.

Parameters
RequestRequest for the query for filtering the result
OffsetOffset of the query
LimitMaximum number of game sessions listed
Returns
true if request successfully sent

◆ ServerQueryPartySessions()

bool FOnlineSessionV2AccelByte::ServerQueryPartySessions ( const FAccelByteModelsV2QueryPartiesRequest & Request,
int64 Offset = 0,
int64 Limit = 20 )

Query party sessions from a server, listen for OnServerQueryPartySessionsComplete delegate for the result.

Parameters
RequestRequest for the query for filtering the result
OffsetOffset of the query
LimitMaximum number of game sessions listed
Returns
true if request successfully sent

◆ SessionContainsMember()

bool FOnlineSessionV2AccelByte::SessionContainsMember ( const FUniqueNetId & UserId,
FName SessionName )

Check if a userId is a member in a named session

Parameters
UserIdID of the player that you are attempting to search in a session
SessionNameSession name we are searching the user in
Returns
true if UserId is part of session member, false otherwise.

◆ SetDSTimeout()

void FOnlineSessionV2AccelByte::SetDSTimeout ( int32 NewTimeout)

set DS session timeout to the new number given.

Parameters
NewTimeoutnew number for DS session timeout.

◆ SetEnablePartyMemberPastSessionRecordSync()

void FOnlineSessionV2AccelByte::SetEnablePartyMemberPastSessionRecordSync ( bool bEnable,
uint32 AmountOfPastSessionRecorded = 5 )

Enable/disable a feature to automatically sync the game client user's past session record to the party attribute from the memory. It allow another party member read the current user's past session ID. The purpose is to allow the party leader to start matchmaking with a filter to exclude those past sessions.

Parameters
AmountOfPastSessionRecordedThe amount of session count that will be recorded & synchronized across the party member.

◆ SetLocalServerIpOverride()

void FOnlineSessionV2AccelByte::SetLocalServerIpOverride ( const FString & InLocalServerIpOverride)

Set an override for a local server IP to register with. Only intended for use with local dedicated servers.

◆ SetLocalServerNameOverride()

void FOnlineSessionV2AccelByte::SetLocalServerNameOverride ( const FString & InLocalServerNameOverride)

Set an override for a local server name to register with. Only intended for use with local dedicated servers.

◆ SetLocalServerPortOverride()

void FOnlineSessionV2AccelByte::SetLocalServerPortOverride ( int32 InLocalServerPortOverride)

Set an override for a local server name to register with. Only intended for use with local dedicated servers.

◆ SetMatchTicketCheckEnabled()

void FOnlineSessionV2AccelByte::SetMatchTicketCheckEnabled ( const bool Enabled)

Set enable match ticket status check polling.

Parameters
Enabledtrue will enable match ticket check polling

◆ SetMatchTicketCheckInitialDelay()

void FOnlineSessionV2AccelByte::SetMatchTicketCheckInitialDelay ( const int32 Sec)

Set match ticket status check delay after matchmaking first started.

Parameters
SecDelay time in second

◆ SetMatchTicketCheckPollInterval()

void FOnlineSessionV2AccelByte::SetMatchTicketCheckPollInterval ( const int32 Sec)

Set match ticket status check delay polling if the ticket state still waiting for match after first check.

Parameters
SecInterval delay time in second

◆ SetMatchTicketCheckPollToNextPollTime()

void FOnlineSessionV2AccelByte::SetMatchTicketCheckPollToNextPollTime ( )

Set match ticket details poll to next polling time

◆ SetMetricCollector()

void FOnlineSessionV2AccelByte::SetMetricCollector ( const TSharedPtr< AccelByte::IAccelByteStatsDMetricCollector > & Collector)

Set the StatsD Metric Collector. By default it will use AccelByteStatsDMetricCollector class. Should be set if custom collector is needed.

Parameters
CollectorThe collector object inherited from IAccelByteStatsDMetricCollector

◆ SetMetricLabel()

void FOnlineSessionV2AccelByte::SetMetricLabel ( const FString & Key,
const FString & Value )

Set Label to a specific Key of metric

Parameters
KeyKey to add label
Valuelabel name for the key

◆ SetOptionalMetricsEnabled()

void FOnlineSessionV2AccelByte::SetOptionalMetricsEnabled ( bool Enable)

Set Sending optional metrics or not

◆ SetServerTimeout()

void FOnlineSessionV2AccelByte::SetServerTimeout ( int32 NewTimeout)

Set Timeout for the dedicated server.

◆ SetSessionInviteCheckPollEnabled()

void FOnlineSessionV2AccelByte::SetSessionInviteCheckPollEnabled ( bool Enabled)

Set enabled state of session invite check polling after match is found.

Parameters
Enabledtrue will enable session invite check polling

◆ SetSessionInviteCheckPollInitialDelay()

void FOnlineSessionV2AccelByte::SetSessionInviteCheckPollInitialDelay ( int32 Sec)

Set session invite check initial delay after match found notification is received.

Parameters
SecInitial delay in seconds

◆ SetSessionInviteCheckPollInterval()

void FOnlineSessionV2AccelByte::SetSessionInviteCheckPollInterval ( int32 Sec)

Set session invite check interval if previous call failed.

Parameters
SecInitial delay in seconds

◆ SetSessionMaxPlayerCount() [1/2]

bool FOnlineSessionV2AccelByte::SetSessionMaxPlayerCount ( const FName & SessionName,
int32 NewMaxPlayerCount ) const

Set the maximum amount of players allowed in the session specified. After calling this, UpdateSession must be called for this to take effect on backend.

◆ SetSessionMaxPlayerCount() [2/2]

bool FOnlineSessionV2AccelByte::SetSessionMaxPlayerCount ( FOnlineSession * Session,
int32 NewMaxPlayerCount ) const

Set the maximum amount of players allowed in the session specified. After calling this, UpdateSession must be called for this to take effect on backend.

◆ SetSessionServerCheckPollEnabled()

void FOnlineSessionV2AccelByte::SetSessionServerCheckPollEnabled ( bool Enabled)

Set enable session server check polling.

Parameters
Enabledtrue will enable session server check polling

◆ SetSessionServerCheckPollInitialDelay()

void FOnlineSessionV2AccelByte::SetSessionServerCheckPollInitialDelay ( int32 Sec)

Set session server status check after joining a session.

Parameters
SecDelay time in seconds

◆ SetSessionServerCheckPollInterval()

void FOnlineSessionV2AccelByte::SetSessionServerCheckPollInterval ( int32 Sec)

Set session server status check polling interval if the previous attempt still waiting for Server.

Parameters
Secinterval delay in second

◆ ShouldSkipAddingFieldToSessionAttributes()

bool FOnlineSessionV2AccelByte::ShouldSkipAddingFieldToSessionAttributes ( const FName & FieldName) const

Checks whether or not the attribute name passed in is intended to be ignored for session attributes on backend.

◆ StartMatchmaking()

bool FOnlineSessionV2AccelByte::StartMatchmaking ( const TArray< FSessionMatchmakingUser > & LocalPlayers,
FName SessionName,
const FOnlineSessionSettings & NewSessionSettings,
TSharedRef< FOnlineSessionSearchAccelByte > & SearchSettings,
const FOnStartMatchmakingComplete & CompletionDelegate )

Begins cloud based matchmaking for a session

Parameters
LocalPlayersthe ids of all local players that will participate in the match
SessionNamethe name of the session to use, usually will be GAME_SESSION_NAME
NewSessionSettingsthe desired settings to match against or create with when forming new sessions
SearchSettingsthe desired settings that the matched session will have.
CompletionDelegateDelegate triggered when call complete
Returns
true if successful searching for sessions, false otherwise

◆ StartMatchTicketCheckPoll()

void FOnlineSessionV2AccelByte::StartMatchTicketCheckPoll ( )

Set match ticket details poll to start polling time

◆ StopMatchTicketCheckPoll()

void FOnlineSessionV2AccelByte::StopMatchTicketCheckPoll ( )

Stop match ticket details poll to next polling time

◆ StorePlayerAttributes()

void FOnlineSessionV2AccelByte::StorePlayerAttributes ( const FUniqueNetId & LocalPlayerId,
FAccelByteModelsV2PlayerAttributes && Attributes )

Stores attributes for a player in this interface. Intended to be used at login.

Parameters
LocalPlayerIdID of the player that we wish to store attributes for
AttributesAttributes that we wish to store locally for this player, will be moved directly into map

◆ Tick()

void FOnlineSessionV2AccelByte::Tick ( float DeltaTime)

Session tick for various background tasks

◆ UnregisterServer()

void FOnlineSessionV2AccelByte::UnregisterServer ( FName SessionName,
const FOnUnregisterServerComplete & Delegate = FOnUnregisterServerComplete() )

Unregister a dedicated server from Armada

◆ UpdateDSInformation()

bool FOnlineSessionV2AccelByte::UpdateDSInformation ( FName SessionName,
FAccelByteModelsGameSessionUpdateDSInformationRequest const & NewDSInformation,
FOnUpdateDSInformationComplete const & CompletionDelegate )

Update DS information for the session associated with the given session name. Only implemented for dedicated servers.

Parameters
SessionNameName of the locally stored session that we want to update DS information for
NewDSInformationStructure containing the DS information that we wish to set on the session
CompletionDelegateDelegate triggered when DS information update is complete

◆ UpdateInternalGameSession()

void FOnlineSessionV2AccelByte::UpdateInternalGameSession ( const FName & SessionName,
const FAccelByteModelsV2GameSession & UpdatedGameSession,
bool & bIsConnectingToP2P,
const bool bIsFirstJoin = false,
const bool bUpdateSessionStorage = true )

Update game session data from a backend model. Used for update notifications and refreshing a game session manually.

◆ UpdateInternalPartySession()

void FOnlineSessionV2AccelByte::UpdateInternalPartySession ( const FName & SessionName,
const FAccelByteModelsV2PartySession & UpdatedPartySession )

Update party session data from a backend model. Used for update notifications and refreshing a game session manually.

◆ UpdateMemberStatus()

bool FOnlineSessionV2AccelByte::UpdateMemberStatus ( FName SessionName,
const FUniqueNetId & PlayerId,
const EAccelByteV2SessionMemberStatus & Status,
const FOnSessionMemberStatusUpdateComplete & Delegate = FOnSessionMemberStatusUpdateComplete() )

Update the status of a member in a session. Intended to be used by the server to mark a player as connected or left.

Requires permission 'ADMIN:NAMESPACE:{namespace}:SESSION:GAME' to be set with action 'UPDATE'.

◆ UpdatePartySessionStorage()

bool FOnlineSessionV2AccelByte::UpdatePartySessionStorage ( const FUniqueNetId & LocalUserId,
FJsonObjectWrapper const & Data )

Update party session member storage. User can only update or insert their own party storage (non-immutable). Can store generic JSON. This will overwrite the current party session storage if successful. Listen to OnUpdatePartySessionStorageComplete event for detailed information if the storage successfully updated in backend.

NOTE: This function is specifically for party sessions and MUST be called with NAME_PartySession. For game sessions, use UpdateSessionMemberStorage instead.

Parameters
LocalUserIdUniqueNetId of user who will perform party session storage update.
DataThe JSON data for updating the party session storage.
Returns
true if it successfully dispatch task to update the party session storage.

◆ UpdatePartySessionStorageWithPastSessionInfo()

bool FOnlineSessionV2AccelByte::UpdatePartySessionStorageWithPastSessionInfo ( FUniqueNetIdAccelByteUserPtr UserUniqueNetId)

Update current user's party attribute using past session info cached in the memory. Need to be called automatically after join a party or create a party WARNING: this is meant to be called internally if the game enable past session exclusion feature on game client.

Returns
Eligible or not to do this action.

◆ UpdatePlayerAttributes()

bool FOnlineSessionV2AccelByte::UpdatePlayerAttributes ( const FUniqueNetId & LocalPlayerId,
const FOnlineSessionV2AccelBytePlayerAttributes & NewAttributes,
const FOnUpdatePlayerAttributesComplete & Delegate = FOnUpdatePlayerAttributesComplete() )

Sends a request to the session service to update a player's attributes.

Parameters
LocalPlayerIdID of the local player that attributes should be updated for
NewAttributesStructure describing what attributes should be updated for this player
DelegateDelegate to fire after task to update attributes completes

◆ UpdateSessionEntries()

void FOnlineSessionV2AccelByte::UpdateSessionEntries ( )

Check for updates and apply them to each stored session

◆ UpdateSessionLeaderStorage()

bool FOnlineSessionV2AccelByte::UpdateSessionLeaderStorage ( const FUniqueNetId & LocalUserId,
FName SessionName,
FJsonObjectWrapper const & Data )

Update session leader storage, only session leader that can use this. This will overwrite the current session storage if successful. Listen to UpdateSessionLeaderStorageComplete event for detailed information if the storage successfully updated in backend.

Parameters
LocalUserIdUniqueNetId of user who will perform session leader storage update.
SessionNameThe name of the session NAME_GameSession or NAME_PartySession.
DataThe JSON data for updating the leader storage.
Returns
true if it successfully dispatch task to update the leader session storage.

◆ UpdateSessionMemberStorage()

bool FOnlineSessionV2AccelByte::UpdateSessionMemberStorage ( const FUniqueNetId & LocalUserId,
FName SessionName,
FJsonObjectWrapper const & Data )

Update session member storage. This will overwrite the current session storage if successful. Listen to OnUpdateSessionMemberStorageComplete event for detailed information if the storage successfully updated in backend.

Parameters
LocalUserIdUniqueNetId of user who will perform session leader storage update.
SessionNameThe name of the session NAME_GameSession or NAME_PartySession.
DataThe JSON data for updating the member session storage.
Returns
true if it successfully dispatch task to update the member session storage.

Member Data Documentation

◆ CurrentMatchmakingSearchHandle

TSharedPtr<FOnlineSessionSearchAccelByte> FOnlineSessionV2AccelByte::CurrentMatchmakingSearchHandle {nullptr}

Current session search handle that we are using for matchmaking.

#NOTE (Maxwell): Since we only track one handle at a time, we don't support matchmaking for two different session names at the same time. This might be something useful down the line, think about if this is possible to support.

◆ CurrentMatchmakingSessionSettings

FOnlineSessionSettings FOnlineSessionV2AccelByte::CurrentMatchmakingSessionSettings {}

Session settings that we will create the matchmaking session result with.

◆ NextMatchmakingDetailPollTime

FDateTime FOnlineSessionV2AccelByte::NextMatchmakingDetailPollTime {0}

UTC Time for the next poll to check matchmaking details, Intended to be used for trigger manual poll matchmaking progress.

◆ PartySessionStorageLocalUserManager

FAccelBytePartySessionStorageLocalUserManager FOnlineSessionV2AccelByte::PartySessionStorageLocalUserManager {}

Collect & accumulate local users' storage and as the one source of truth before PUT/overwrite to it's reserved PartySessionStorage.

◆ RestoredSessions

TArray<FOnlineRestoredSessionAccelByte> FOnlineSessionV2AccelByte::RestoredSessions

Restored sessions stored in this interface

◆ ServerSessionIdEnvironmentVariable

TCHAR const * FOnlineSessionV2AccelByte::ServerSessionIdEnvironmentVariable = TEXT("NOMAD_META_session_id")
static

Global string for the environment variable to get session ID for a spawned server.

◆ SessionInvites

TArray<FOnlineSessionInviteAccelByte> FOnlineSessionV2AccelByte::SessionInvites

Session invites stored in this interface