EnableTransport
EnableTransport
#Overview
name: EnableTransport
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 12
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of EnableTransport is to control whether the transport channel for various messaging systems in Unreal Engine 5 is enabled or disabled. This setting variable is used across different networking and messaging plugins to determine if their respective transport mechanisms should be initialized and used.
This setting variable is relied upon by several Unreal Engine subsystems and plugins, including:
- QuicMessaging plugin
- WebSocketMessaging plugin
- TcpMessaging plugin
- UdpMessaging plugin
The value of this variable is typically set in the following ways:
- Through configuration files (as indicated by the UPROPERTY(config) attribute)
- Via the Unreal Editor’s project settings
- Through command-line arguments (as seen in the ParseCommandLine functions)
This variable interacts with other settings specific to each messaging system, such as endpoint configurations, auto-repair settings, and other transport-related options.
Developers must be aware of the following when using this variable:
- Enabling or disabling the transport affects the entire messaging system for that particular plugin.
- Changes to this setting may require restarting services or the entire application to take effect.
- Different plugins use this variable independently, so it needs to be set for each messaging system separately.
Best practices when using this variable include:
- Ensure that the appropriate transport is enabled for the networking requirements of your project.
- Be consistent across different build configurations and deployment environments.
- Use the command-line override option for testing or debugging purposes without modifying the project settings.
- When disabling a transport, make sure to properly shut down any related services to avoid resource leaks.
- Consider the performance and security implications of enabling multiple transport systems simultaneously.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:3361, section: [/Script/TcpMessaging.TcpMessagingSettings]
- INI Section:
/Script/TcpMessaging.TcpMessagingSettings
- Raw value:
True
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidEngine.ini:45, section: [/Script/TcpMessaging.TcpMessagingSettings]
- INI Section:
/Script/TcpMessaging.TcpMessagingSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/QuicMessaging/Source/QuicMessaging/Private/QuicMessagingModule.cpp:274
Scope (from outer to inner):
file
class class FQuicMessagingModule : public FSelfRegisteringExec , public IQuicNetworkMessagingExtension , public IModuleInterface
function virtual void RestartServices
Source code excerpt:
const UQuicMessagingSettings& Settings = *GetDefault<UQuicMessagingSettings>();
if (Settings.EnableTransport)
{
InitializeBridge();
}
else
{
ShutdownBridge();
#Loc: <Workspace>/Engine/Plugins/Experimental/QuicMessaging/Source/QuicMessaging/Private/QuicMessagingModule.cpp:667
Scope (from outer to inner):
file
class class FQuicMessagingModule : public FSelfRegisteringExec , public IQuicNetworkMessagingExtension , public IModuleInterface
function void ParseCommandLine
Source code excerpt:
FParse::Bool(CommandLine,
TEXT("-QUICMESSAGING_TRANSPORT_ENABLE="),
Settings->EnableTransport);
FParse::Value(CommandLine,
TEXT("-QUICMESSAGING_TRANSPORT_UNICAST="),
Settings->UnicastEndpoint);
FParse::Bool(CommandLine,
#Loc: <Workspace>/Engine/Plugins/Experimental/QuicMessaging/Source/QuicMessaging/Private/QuicMessagingSettings.cpp:5
Scope (from outer to inner):
file
function UQuicMessagingSettings::UQuicMessagingSettings
Source code excerpt:
UQuicMessagingSettings::UQuicMessagingSettings(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
, EnableTransport(true)
{ }
#Loc: <Workspace>/Engine/Plugins/Experimental/QuicMessaging/Source/QuicMessaging/Public/Shared/QuicMessagingSettings.h:59
Scope (from outer to inner):
file
class class UQuicMessagingSettings : public UObject
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category=Transport)
bool EnableTransport = true;
/** Whether the Quic transport channel should try to auto repair when in error. */
UPROPERTY(config, EditAnywhere, Category=Transport, AdvancedDisplay)
bool bAutoRepair = true;
/**
#Loc: <Workspace>/Engine/Plugins/Experimental/WebSocketMessaging/Source/WebSocketMessaging/Private/WebSocketMessaging.cpp:59
Scope (from outer to inner):
file
function bool FWebSocketMessagingModule::HandleSettingsSaved
Source code excerpt:
bool FWebSocketMessagingModule::HandleSettingsSaved()
{
if (GetDefault<UWebSocketMessagingSettings>()->EnableTransport)
{
InitializeBridge();
}
else
{
ShutdownBridge();
#Loc: <Workspace>/Engine/Plugins/Experimental/WebSocketMessaging/Source/WebSocketMessaging/Private/WebSocketMessagingSettings.h:24
Scope (from outer to inner):
file
class class UWebSocketMessagingSettings : public UObject
Source code excerpt:
/** Whether the WebSocket transport channel is enabled */
UPROPERTY(config, EditAnywhere, Category = Transport)
bool EnableTransport = false;
/** Bind the WebSocket server on the specified port (0 disables it) */
UPROPERTY(config, EditAnywhere, Category = Transport)
int32 ServerPort = 0;
/** Format used to serialize the messages on the server's WebSockets.*/
#Loc: <Workspace>/Engine/Plugins/Messaging/TcpMessaging/Source/TcpMessaging/Private/Settings/TcpMessagingSettings.h:35
Scope (from outer to inner):
file
class class UTcpMessagingSettings : public UObject
Source code excerpt:
/** Whether the TCP transport channel is enabled */
UPROPERTY(config, EditAnywhere, Category = Transport)
bool EnableTransport;
/**
* The IP endpoint to listen for incoming connections.
*
* The format is IP_ADDRESS:PORT_NUMBER or blank to disable listening.
*/
#Loc: <Workspace>/Engine/Plugins/Messaging/TcpMessaging/Source/TcpMessaging/Private/TcpMessagingModule.cpp:339
Scope (from outer to inner):
file
function bool UTcpMessagingSettings::IsTransportEnabled
Source code excerpt:
bool UTcpMessagingSettings::IsTransportEnabled() const
{
if (EnableTransport)
{
return true;
}
if (FParse::Param(FCommandLine::Get(), TEXT("TcpMessagingListen=")) || FParse::Param(FCommandLine::Get(), TEXT("TcpMessagingConnect=")))
{
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/UdpMessagingClasses.cpp:5
Scope (from outer to inner):
file
function UUdpMessagingSettings::UUdpMessagingSettings
Source code excerpt:
UUdpMessagingSettings::UUdpMessagingSettings(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
, EnableTransport(true)
, MulticastTimeToLive(1)
, EnableTunnel(false)
{ }
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/UdpMessagingModule.cpp:341
Scope (from outer to inner):
file
class class FUdpMessagingModule : public FSelfRegisteringExec , public INetworkMessagingExtension , public IModuleInterface
function virtual void RestartServices
Source code excerpt:
const UUdpMessagingSettings& Settings = *GetDefault<UUdpMessagingSettings>();
if (Settings.EnableTransport)
{
InitializeBridge();
}
else
{
ShutdownBridge();
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/UdpMessagingModule.cpp:625
Scope (from outer to inner):
file
class class FUdpMessagingModule : public FSelfRegisteringExec , public INetworkMessagingExtension , public IModuleInterface
function void ParseCommandLine
Source code excerpt:
{
// Parse value overrides (if present)
FParse::Bool(CommandLine, TEXT("-UDPMESSAGING_TRANSPORT_ENABLE="), Settings->EnableTransport);
FParse::Bool(CommandLine, TEXT("-UDPMESSAGING_SHARE_KNOWN_NODES="), Settings->bShareKnownNodesWithActiveConnections);
FParse::Value(CommandLine, TEXT("-UDPMESSAGING_TRANSPORT_UNICAST="), Settings->UnicastEndpoint);
FParse::Value(CommandLine, TEXT("-UDPMESSAGING_TRANSPORT_MULTICAST="), Settings->MulticastEndpoint);
FParse::Value(CommandLine, TEXT("-UDPMESSAGING_WORK_QUEUE_SIZE="), Settings->WorkQueueSize);
FString StaticEndpoints;
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Public/Shared/UdpMessagingSettings.h:54
Scope (from outer to inner):
file
class class UUdpMessagingSettings : public UObject
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category=Transport)
bool EnableTransport;
/** Whether the UDP transport channel should try to auto repair when in error. */
UPROPERTY(config, EditAnywhere, Category=Transport, AdvancedDisplay)
bool bAutoRepair = true;
/**