net.OodleServerEnableMode
net.OodleServerEnableMode
#Overview
name: net.OodleServerEnableMode
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When to enable compression on the server (overrides the \'ServerEnableMode\' .ini setting).
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of net.OodleServerEnableMode is to control when to enable compression on the server side in the Oodle Network compression system. This setting variable is part of the network optimization and compression features in Unreal Engine 5.
This setting variable is primarily used by the OodleNetwork plugin, which is a part of Unreal Engine’s networking subsystem. Specifically, it’s utilized within the OodleNetworkHandlerComponent, which handles Oodle compression for network traffic.
The value of this variable can be set in multiple ways:
- Through the console variable system (CVarOodleServerEnableMode)
- In the game’s configuration files (.ini)
- Potentially through code, by modifying the CVarOodleServerEnableMode directly
The associated variable CVarOodleServerEnableMode is an auto console variable that allows runtime modification of this setting. It overrides the ‘ServerEnableMode’ setting in the .ini file when set.
There is a client-side counterpart to this variable, net.OodleClientEnableMode, which serves a similar purpose for client-side compression.
Developers should be aware of the following when using this variable:
- It directly impacts server-side network performance and compression behavior.
- Changes made through the console variable will override .ini settings.
- The variable expects a string value, likely representing different modes of operation (though the exact modes are not specified in the provided code).
Best practices for using this variable include:
- Carefully testing different compression modes to find the optimal balance between performance and network efficiency.
- Documenting any changes made to this setting, as it can significantly impact network behavior.
- Considering both server and client settings (net.OodleServerEnableMode and net.OodleClientEnableMode) when optimizing network compression.
Regarding the associated variable CVarOodleServerEnableMode: This is an auto console variable that directly controls the net.OodleServerEnableMode setting. It allows for runtime modification of the server compression enable mode. The variable is initialized with an empty string and can be set to override the ‘ServerEnableMode’ setting from the .ini file.
When using CVarOodleServerEnableMode, developers should:
- Understand that changes to this variable will immediately affect server-side compression behavior.
- Use it for testing different compression settings without needing to modify configuration files.
- Be cautious when modifying it in a live environment, as it could impact all connected clients.
Best practices for CVarOodleServerEnableMode include:
- Using it primarily for debugging and performance tuning.
- Reverting to .ini settings for stable, production configurations.
- Coordinating changes with client-side settings to ensure optimal network performance.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Compression/OodleNetwork/Source/Private/OodleNetworkHandlerComponent.cpp:164
Scope: file
Source code excerpt:
TAutoConsoleVariable<FString> CVarOodleServerEnableMode(
TEXT("net.OodleServerEnableMode"), "",
TEXT("When to enable compression on the server (overrides the 'ServerEnableMode' .ini setting)."));
TAutoConsoleVariable<FString> CVarOodleClientEnableMode(
TEXT("net.OodleClientEnableMode"), "",
TEXT("When to enable compression on the client (overrides the 'ClientEnableMode' .ini setting)."));
#Associated Variable and Callsites
This variable is associated with another variable named CVarOodleServerEnableMode
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Compression/OodleNetwork/Source/Private/OodleNetworkHandlerComponent.cpp:163
Scope: file
Source code excerpt:
TAutoConsoleVariable<FString> CVarOodleServerEnableMode(
TEXT("net.OodleServerEnableMode"), "",
TEXT("When to enable compression on the server (overrides the 'ServerEnableMode' .ini setting)."));
TAutoConsoleVariable<FString> CVarOodleClientEnableMode(
TEXT("net.OodleClientEnableMode"), "",
TEXT("When to enable compression on the client (overrides the 'ClientEnableMode' .ini setting)."));
#Loc: <Workspace>/Engine/Plugins/Compression/OodleNetwork/Source/Private/OodleNetworkHandlerComponent.cpp:475
Scope (from outer to inner):
file
function void OodleNetworkHandlerComponent::Initialize
Source code excerpt:
// ServerEnableMode
CurEnableModeStr = CVarOodleServerEnableMode.GetValueOnAnyThread();
bSetServerEnableMode = CurEnableModeStr.Len() > 0 && SetEnableModeFromStr(ServerEnableMode, CurEnableModeStr);
if (!bSetServerEnableMode)
{
bSetServerEnableMode = GConfig->GetString(OODLE_INI_SECTION, TEXT("ServerEnableMode"), CurEnableModeStr, GEngineIni) &&