net.RPCDoSDetectionOverride
net.RPCDoSDetectionOverride
#Overview
name: net.RPCDoSDetectionOverride
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Overrides whether or not RPC DoS Detection is enabled per-NetDriver. 0 = disabled, 1 = enabled. Example: net.RPCDoSDetectionOverride=GameNetDriver=1,BeaconNetDriver=0
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of net.RPCDoSDetectionOverride is to provide a way to override the Remote Procedure Call (RPC) Denial of Service (DoS) detection settings for specific NetDrivers in Unreal Engine 5. This setting variable is part of the networking system, specifically the RPC DoS protection mechanism.
This setting variable is primarily used in the Engine’s networking subsystem, particularly in the RPC DoS detection module. It’s referenced in the file “RPCDoSDetection.cpp”, which is part of the Engine’s runtime.
The value of this variable is set through the console or configuration files. It’s defined as a TAutoConsoleVariable, which means it can be changed at runtime through console commands.
The associated variable CVarRPCDoSDetectionOverride interacts directly with net.RPCDoSDetectionOverride. They share the same value and purpose.
Developers must be aware that this variable allows for fine-grained control over RPC DoS detection on a per-NetDriver basis. The value is a string that can contain multiple NetDriver settings, separated by commas. Each NetDriver setting is in the format “NetDriverName=Value”, where Value is 0 to disable or 1 to enable RPC DoS detection for that specific NetDriver.
Best practices when using this variable include:
- Only modify it when necessary, as RPC DoS detection is an important security feature.
- Be consistent in your usage across different network configurations.
- Document any changes made to this setting, as it can significantly impact network security.
- Test thoroughly after making changes to ensure network functionality and security are not compromised.
Regarding the associated variable CVarRPCDoSDetectionOverride:
The purpose of CVarRPCDoSDetectionOverride is identical to net.RPCDoSDetectionOverride. It’s the actual C++ variable that holds the console variable’s value.
This variable is used in the Engine’s networking subsystem, specifically in the RPC DoS detection module.
The value of CVarRPCDoSDetectionOverride is set automatically by the console variable system when net.RPCDoSDetectionOverride is modified.
It interacts directly with net.RPCDoSDetectionOverride and is used in the InitConfig function of the FRPCDoSDetection class to initialize the DoS detection configuration.
Developers should be aware that this variable is the actual storage for the console variable’s value and is used internally by the engine.
Best practices for CVarRPCDoSDetectionOverride are the same as for net.RPCDoSDetectionOverride, as they represent the same setting. Developers should generally interact with the console variable (net.RPCDoSDetectionOverride) rather than directly with CVarRPCDoSDetectionOverride.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:51
Scope: file
Source code excerpt:
TAutoConsoleVariable<FString> CVarRPCDoSDetectionOverride(
TEXT("net.RPCDoSDetectionOverride"), TEXT(""),
TEXT("Overrides whether or not RPC DoS Detection is enabled per-NetDriver. 0 = disabled, 1 = enabled. ")
TEXT("Example: net.RPCDoSDetectionOverride=GameNetDriver=1,BeaconNetDriver=0"));
int32 GAllowRPCDoSDetectionBlocking = 1;
FAutoConsoleVariableRef CVarAllowRPCDoSDetectionBlocking(
#Associated Variable and Callsites
This variable is associated with another variable named CVarRPCDoSDetectionOverride
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:50
Scope: file
Source code excerpt:
*/
TAutoConsoleVariable<FString> CVarRPCDoSDetectionOverride(
TEXT("net.RPCDoSDetectionOverride"), TEXT(""),
TEXT("Overrides whether or not RPC DoS Detection is enabled per-NetDriver. 0 = disabled, 1 = enabled. ")
TEXT("Example: net.RPCDoSDetectionOverride=GameNetDriver=1,BeaconNetDriver=0"));
int32 GAllowRPCDoSDetectionBlocking = 1;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:385
Scope (from outer to inner):
file
function void FRPCDoSDetection::InitConfig
Source code excerpt:
FString RPCDoSDetectionOverride = CVarRPCDoSDetectionOverride.GetValueOnAnyThread();
if (RPCDoSDetectionOverride.Contains(TEXT(",")) || RPCDoSDetectionOverride.Contains(TEXT("=")))
{
TArray<FString> NetDriverOverrides;
RPCDoSDetectionOverride.ParseIntoArray(NetDriverOverrides, TEXT(","));