HitchSuspendDetectionTimeMS
HitchSuspendDetectionTimeMS
#Overview
name: HitchSuspendDetectionTimeMS
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of HitchSuspendDetectionTimeMS is to define a time interval during which RPC DoS (Denial of Service) detection is suspended after a hitch is encountered in the game. This setting is part of Unreal Engine’s networking system, specifically the RPC DoS detection mechanism.
This setting variable is primarily used in the networking subsystem of Unreal Engine, particularly in the RPC DoS detection module. It’s referenced in the FRPCDoSDetection class, which is responsible for detecting and mitigating potential DoS attacks through Remote Procedure Calls (RPCs).
The value of this variable is set in the URPCDoSDetectionConfig class, which is likely loaded from a configuration file. It’s defined as a UPROPERTY with the ‘config’ specifier, indicating that it can be set in the engine’s configuration files.
HitchSuspendDetectionTimeMS interacts with other variables in the RPC DoS detection system, such as HitchSuspendDetectionStartTime and bHitchSuspendDetection. These variables work together to implement the suspension of DoS detection during hitches.
Developers must be aware that this variable is crucial for preventing false positives in DoS detection when the game experiences a hitch. A hitch can cause a buildup of packets, which might be mistaken for a DoS attack if not properly handled.
Best practices when using this variable include:
-
Setting an appropriate value that balances security and performance. Too short a time might not effectively prevent false positives, while too long a time could leave the system vulnerable to actual attacks.
-
Monitoring and adjusting this value based on the specific needs of the game and its network behavior.
-
Considering this setting in conjunction with other RPC DoS detection settings for a comprehensive approach to network security.
-
Testing thoroughly with various network conditions to ensure the chosen value doesn’t negatively impact legitimate gameplay.
-
Documenting any changes to this setting and their impacts on the game’s network behavior for future reference.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1701, section: [GameNetDriver RPCDoSDetection]
- INI Section:
GameNetDriver RPCDoSDetection
- Raw value:
1000
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEngine.ini:1718, section: [BeaconNetDriver RPCDoSDetection]
- INI Section:
BeaconNetDriver RPCDoSDetection
- Raw value:
1000
- Is Array:
False
#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:374
Scope (from outer to inner):
file
function void FRPCDoSDetection::InitConfig
Source code excerpt:
bRPCDoSAnalytics = CurConfigObj->bRPCDoSAnalytics;
HitchTimeQuotaMS = CurConfigObj->HitchTimeQuotaMS;
HitchSuspendDetectionTimeMS = CurConfigObj->HitchSuspendDetectionTimeMS;
if (NextTimeQuotaCheck == 0.0 && CurConfigObj->InitialConnectToleranceMS > 0)
{
NextTimeQuotaCheck = FPlatformTime::Seconds() + (CurConfigObj->InitialConnectToleranceMS / 1000.0);
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:779
Scope (from outer to inner):
file
function void FRPCDoSDetection::PreTickDispatch
Source code excerpt:
HitchSuspendDetectionStartTime = TimeSeconds;
}
else if (bHitchSuspendDetection && (int32)((TimeSeconds - HitchSuspendDetectionStartTime) * 1000.0) > HitchSuspendDetectionTimeMS)
{
bHitchSuspendDetection = false;
}
}
if (ActiveState > 0)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetectionConfig.h:70
Scope (from outer to inner):
file
class class URPCDoSDetectionConfig : public UObject
Source code excerpt:
/** The amount of time to suspend RPC DoS Detection, once a hitch is encountered, prevent false positives from built-up packets */
UPROPERTY(config)
int32 HitchSuspendDetectionTimeMS;
/** Names of the different RPC DoS detection states, for escalating severity, depending on the amount of RPC spam */
UPROPERTY(config)
TArray<FString> DetectionSeverity;
/** The amount of time since the client connected, before time-based checks should become active (to reduce false positives) */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:1134
Scope (from outer to inner):
file
class class FRPCDoSDetection : protected FRPCDoSState
Source code excerpt:
/** The amount of time to suspend RPC DoS Detection, once a hitch is encountered, to prevent false positives from built-up packets */
int32 HitchSuspendDetectionTimeMS = 0;
/** List of RPC's which should never be blocked */
TArray<FName> RPCBlockAllowList;
/** If the related CVar is set, the name of the RPC which should forcibly enable tracking. */
FName ForcedRPCTracking;