net.OodleClientEnableMode
net.OodleClientEnableMode
#Overview
name: net.OodleClientEnableMode
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When to enable compression on the client (overrides the \'ClientEnableMode\' .ini setting).
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of net.OodleClientEnableMode is to control when to enable Oodle compression on the client-side in Unreal Engine’s networking system. This setting is part of the Oodle Network Compression plugin, which is used to optimize network traffic in multiplayer games.
This setting variable is primarily used by the OodleNetwork plugin, specifically within the OodleNetworkHandlerComponent. Based on the callsites, it’s clear that this variable is part of the networking subsystem of Unreal Engine.
The value of this variable is set through a console variable (CVar) system. It can be set programmatically or through console commands during runtime. The default value is an empty string, but it can be overridden by developers or through configuration files.
This variable interacts closely with its associated variable CVarOodleClientEnableMode. They share the same value and purpose, with CVarOodleClientEnableMode being the actual console variable implementation.
Developers must be aware that this setting overrides the ‘ClientEnableMode’ setting in the .ini configuration file. This means that if set, it takes precedence over the static configuration.
Best practices when using this variable include:
- Use it for debugging or testing different compression settings without modifying configuration files.
- Be cautious when setting it in a production environment, as it affects network performance and behavior.
- Coordinate its use with server-side settings to ensure optimal compression strategies.
Regarding the associated variable CVarOodleClientEnableMode:
The purpose of CVarOodleClientEnableMode is to provide a runtime-configurable way to control Oodle compression on the client-side. It’s the actual console variable that net.OodleClientEnableMode refers to.
This variable is used within the OodleNetworkHandlerComponent to determine the client’s compression enable mode. It’s part of the Oodle Network Compression plugin and directly affects how the networking system handles data compression for outgoing client packets.
The value of CVarOodleClientEnableMode is set through the console variable system and can be changed during runtime. It’s initialized with an empty string but can be modified as needed.
CVarOodleClientEnableMode interacts directly with the ClientEnableMode setting. If CVarOodleClientEnableMode has a non-empty value, it overrides the ClientEnableMode setting from the configuration file.
Developers should be aware that changes to this variable take effect immediately and can significantly impact network performance and behavior. It should be used carefully, especially in production environments.
Best practices for using CVarOodleClientEnableMode include:
- Use it for testing different compression settings in development and debugging scenarios.
- Document any non-default values used in production to ensure consistency across builds and deployments.
- Consider exposing this setting in a developer-only menu for easy adjustment during testing.
#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:168
Scope: file
Source code excerpt:
TAutoConsoleVariable<FString> CVarOodleClientEnableMode(
TEXT("net.OodleClientEnableMode"), "",
TEXT("When to enable compression on the client (overrides the 'ClientEnableMode' .ini setting)."));
// @todo #JohnB: Remove after Oodle update, and after checking with Luigi
static OO_BOOL STDCALL UEOodleDisplayAssert(const char* File, const int Line, const char* Function, const char* Message)
#Associated Variable and Callsites
This variable is associated with another variable named CVarOodleClientEnableMode
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Compression/OodleNetwork/Source/Private/OodleNetworkHandlerComponent.cpp:167
Scope: file
Source code excerpt:
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)."));
// @todo #JohnB: Remove after Oodle update, and after checking with Luigi
#Loc: <Workspace>/Engine/Plugins/Compression/OodleNetwork/Source/Private/OodleNetworkHandlerComponent.cpp:486
Scope (from outer to inner):
file
function void OodleNetworkHandlerComponent::Initialize
Source code excerpt:
// ClientEnableMode
CurEnableModeStr = CVarOodleClientEnableMode.GetValueOnAnyThread();
bSetClientEnableMode = CurEnableModeStr.Len() > 0 && SetEnableModeFromStr(ClientEnableMode, CurEnableModeStr);
if (!bSetClientEnableMode)
{
bSetClientEnableMode = GConfig->GetString(OODLE_INI_SECTION, TEXT("ClientEnableMode"), CurEnableModeStr, GEngineIni) &&