UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSessionManager Class Reference

#include <SessionManager.h>

+ Inheritance diagram for FSessionManager:

Public Member Functions

 FSessionManager (const TSharedRef< IMessageBus, ESPMode::ThreadSafe > &InMessageBus)
 
 ~FSessionManager ()
 
virtual void AddOwner (const FString &InOwner) override
 
virtual const TArray< TSharedPtr< ISessionInstanceInfo > > & GetSelectedInstances () const override
 
virtual const TSharedPtr< ISessionInfo > & GetSelectedSession () const override
 
virtual void GetSessions (TArray< TSharedPtr< ISessionInfo > > &OutSessions) const override
 
virtual bool IsInstanceSelected (const TSharedRef< ISessionInstanceInfo > &Instance) const override
 
virtual FCanSelectSessionEventOnCanSelectSession () override
 
virtual FInstanceSelectionChangedEventOnInstanceSelectionChanged () override
 
virtual FLogReceivedEventOnLogReceived () override
 
virtual FSelectedSessionChangedEventOnSelectedSessionChanged () override
 
virtual FSimpleMulticastDelegateOnSessionsUpdated () override
 
virtual FSimpleMulticastDelegateOnSessionInstanceUpdated () override
 
virtual void RemoveOwner (const FString &InOwner) override
 
virtual bool SelectSession (const TSharedPtr< ISessionInfo > &Session) override
 
virtual bool SetInstanceSelected (const TSharedRef< ISessionInstanceInfo > &Instance, bool Selected) override
 
- Public Member Functions inherited from TSharedFromThis< FSessionManager >
TSharedRef< FSessionManager, Mode > AsShared ()
 
TSharedRef< FSessionManager const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FSessionManager, Mode > AsWeak ()
 
TWeakPtr< FSessionManager const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 
- Public Member Functions inherited from ISessionManager
 DECLARE_EVENT_TwoParams (ISessionManager, FCanSelectSessionEvent, const TSharedPtr< ISessionInfo > &, bool &) virtual FCanSelectSessionEvent &OnCanSelectSession()=0
 
 DECLARE_EVENT_TwoParams (ISessionManager, FInstanceSelectionChangedEvent, const TSharedPtr< ISessionInstanceInfo > &, bool) virtual FInstanceSelectionChangedEvent &OnInstanceSelectionChanged()=0
 
 DECLARE_EVENT_ThreeParams (ISessionManager, FLogReceivedEvent, const TSharedRef< ISessionInfo > &, const TSharedRef< ISessionInstanceInfo > &, const TSharedRef< FSessionLogMessage > &)
 
 DECLARE_EVENT_OneParam (ISessionManager, FSelectedSessionChangedEvent, const TSharedPtr< ISessionInfo > &) virtual FSelectedSessionChangedEvent &OnSelectedSessionChanged()=0
 
virtual ~ISessionManager ()
 

Protected Member Functions

void FindExpiredSessions (const FDateTime &Now)
 
bool IsValidOwner (const FString &Owner)
 
void RefreshSessions ()
 
void SendPing ()
 
- Protected Member Functions inherited from TSharedFromThis< FSessionManager >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FSessionManager >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Implement the session manager

Constructor & Destructor Documentation

◆ FSessionManager()

FSessionManager::FSessionManager ( const TSharedRef< IMessageBus, ESPMode::ThreadSafe > &  InMessageBus)

Creates and initializes a new instance.

Parameters
InMessageBusThe message bus to use.

◆ ~FSessionManager()

FSessionManager::~FSessionManager ( )

Destructor

Member Function Documentation

◆ AddOwner()

void FSessionManager::AddOwner ( const FString &  InOwner)
overridevirtual

Adds an owner whose sessions we are interested in

Parameters
InOwnerSession owner we want to view sessions from

Implements ISessionManager.

◆ FindExpiredSessions()

void FSessionManager::FindExpiredSessions ( const FDateTime Now)
protected

Finds and removes sessions that haven't been updated in a while.

Parameters
NowThe current time.

◆ GetSelectedInstances()

const TArray< TSharedPtr< ISessionInstanceInfo > > & FSessionManager::GetSelectedInstances ( ) const
overridevirtual

Gets the collection of currently selected engine instances.

Returns
The selected instances.

Implements ISessionManager.

◆ GetSelectedSession()

const TSharedPtr< ISessionInfo > & FSessionManager::GetSelectedSession ( ) const
overridevirtual

Get the selected session - as chosen in the session browser

Returns
The session ID selected

Implements ISessionManager.

◆ GetSessions()

void FSessionManager::GetSessions ( TArray< TSharedPtr< ISessionInfo > > &  OutSessions) const
overridevirtual

Gets the list of all discovered sessions.

Parameters
OutSessionsWill hold the collection of sessions.

Implements ISessionManager.

◆ IsInstanceSelected()

bool FSessionManager::IsInstanceSelected ( const TSharedRef< ISessionInstanceInfo > &  Instance) const
overridevirtual

Checks whether the given instance is currently selected.

Returns
true if the instance is selected, false otherwise.

Implements ISessionManager.

◆ IsValidOwner()

bool FSessionManager::IsValidOwner ( const FString &  Owner)
protected

Checks whether the specified owner is valid.

Returns
true if the owner is valid, false otherwise.

◆ OnCanSelectSession()

virtual FCanSelectSessionEvent & FSessionManager::OnCanSelectSession ( )
inlineoverridevirtual

◆ OnInstanceSelectionChanged()

virtual FInstanceSelectionChangedEvent & FSessionManager::OnInstanceSelectionChanged ( )
inlineoverridevirtual

◆ OnLogReceived()

virtual FLogReceivedEvent & FSessionManager::OnLogReceived ( )
inlineoverridevirtual

Implements ISessionManager.

◆ OnSelectedSessionChanged()

virtual FSelectedSessionChangedEvent & FSessionManager::OnSelectedSessionChanged ( )
inlineoverridevirtual

◆ OnSessionInstanceUpdated()

FSimpleMulticastDelegate & FSessionManager::OnSessionInstanceUpdated ( )
overridevirtual

Returns a delegate that is executed when a session instance is updated.

Returns
The delegate.

Implements ISessionManager.

◆ OnSessionsUpdated()

FSimpleMulticastDelegate & FSessionManager::OnSessionsUpdated ( )
overridevirtual

Returns a delegate that is executed when the list of sessions has changed.

Returns
The delegate.

Implements ISessionManager.

◆ RefreshSessions()

void FSessionManager::RefreshSessions ( )
protected

Refresh the sessions based on the owner filter list.

◆ RemoveOwner()

void FSessionManager::RemoveOwner ( const FString &  InOwner)
overridevirtual

Removes an owner whose sessions we are no longer interested in

Parameters
InOwnerSession owner we want to remove

Implements ISessionManager.

◆ SelectSession()

bool FSessionManager::SelectSession ( const TSharedPtr< ISessionInfo > &  Session)
overridevirtual

Selects the specified session.

Parameters
SessionThe session to the select (can be NULL to select none).
Returns
true if the session was selected, false otherwise.

Implements ISessionManager.

◆ SendPing()

void FSessionManager::SendPing ( )
protected

Pings all sessions on the network.

◆ SetInstanceSelected()

bool FSessionManager::SetInstanceSelected ( const TSharedRef< ISessionInstanceInfo > &  Instance,
bool  Selected 
)
overridevirtual

Marks the specified item as selected or unselected.

Parameters
InstanceThe instance to mark.
SelectedWhether the instance should be selected (true) or unselected (false).
Returns
true if the instance was selected, false otherwise.

Implements ISessionManager.


The documentation for this class was generated from the following files: