SESSION
SESSION
#Overview
name: SESSION
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SESSION is to handle session-related commands and functionality within the Unreal Engine’s online subsystem and session services.
SESSION is primarily used in the online subsystem and session services modules of Unreal Engine. Based on the callsites provided, it is referenced in the OnlineSubsystem, OnlineSubsystemTencent, and SessionServices modules.
The value of this variable is not directly set in the provided code snippets. Instead, it’s used as a command identifier in parsing functions to route execution to specific session-related command handlers.
SESSION interacts with other command parsing variables and functions, such as FParse::Command, which is used to check if the SESSION command is present in the input.
Developers must be aware that SESSION is used as a high-level command identifier for session-related operations. It’s typically followed by more specific subcommands that determine the exact session operation to be performed.
Best practices when using this variable include:
- Ensuring that session-related commands are properly structured with SESSION as the primary identifier followed by specific subcommands.
- Implementing comprehensive session command handling in the HandleSessionExecCommands function for each relevant subsystem.
- Maintaining consistency in session command structure across different online subsystems for better interoperability.
- Documenting all available SESSION subcommands and their functionalities for easier maintenance and usage.
- Considering security implications when implementing session-related commands, especially in networked environments.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystem/Source/Private/OnlineSubsystemImpl.cpp:252
Scope (from outer to inner):
file
function bool FOnlineSubsystemImpl::Exec
Source code excerpt:
bWasHandled = HandleFriendExecCommands(InWorld, Cmd, Ar);
}
else if (FParse::Command(&Cmd, TEXT("SESSION")))
{
bWasHandled = HandleSessionExecCommands(InWorld, Cmd, Ar);
}
else if (FParse::Command(&Cmd, TEXT("PRESENCE")))
{
bWasHandled = HandlePresenceExecCommands(InWorld, Cmd, Ar);
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemTencent/Source/Private/OnlineSubsystemTencent.cpp:545
Scope (from outer to inner):
file
function bool FOnlineSubsystemTencent::Exec
Source code excerpt:
#endif // WITH_DEV_AUTOMATION_TESTS
}
else if (FParse::Command(&Cmd, TEXT("SESSION")))
{
bWasHandled = HandleSessionExecCommands(InWorld, Cmd, Ar);
}
else if (FParse::Command(&Cmd, TEXT("PRESENCE")))
{
bWasHandled = HandlePresenceExecCommands(InWorld, Cmd, Ar);
#Loc: <Workspace>/Engine/Source/Runtime/SessionServices/Private/SessionServicesModule.cpp:35
Scope (from outer to inner):
file
class class FSessionServicesModule : public FSelfRegisteringExec , public ISessionServicesModule
function virtual bool Exec_Runtime
Source code excerpt:
virtual bool Exec_Runtime(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar) override
{
if (!FParse::Command(&Cmd, TEXT("SESSION")))
{
return false;
}
if (FParse::Command(&Cmd, TEXT("AUTH")))
{