AutoEscalateTime
AutoEscalateTime
#Overview
name: AutoEscalateTime
The value of this variable can be defined or overridden in .ini config files. 4
.ini config files referencing this setting variable.
It is referenced in 9
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AutoEscalateTime is to control the automatic escalation of severity in various network-related systems within Unreal Engine 5, particularly in the context of RPC (Remote Procedure Call) Denial of Service (DoS) detection and network fault recovery mechanisms.
This setting variable is primarily used by the networking subsystem of Unreal Engine 5, specifically in the RPC DoS detection module and the network connection fault recovery system. The main modules that rely on this variable are:
- Engine’s RPC DoS Detection system
- Net Core’s Escalation States system
- Net Core’s Connection Fault Recovery system
The value of this variable is typically set in configuration files or through code initialization. It can be set differently for various severity categories or states.
AutoEscalateTime interacts with other variables such as CooloffTime, and is often used in conjunction with time-tracking variables to determine when to escalate severity levels.
Developers must be aware of the following when using this variable:
- AutoEscalateTime should always be larger than CooloffTime to ensure proper functionality.
- A value of -1 typically indicates that auto-escalation is disabled.
- The variable is used in time-sensitive operations, so its value should be carefully considered in the context of the specific use case.
Best practices when using this variable include:
- Carefully tune the value based on the specific needs of your game’s networking requirements.
- Ensure it’s properly set for different severity categories or states if applicable.
- Always validate the config to ensure AutoEscalateTime is greater than CooloffTime.
- Consider the implications of auto-escalation on your game’s network behavior and player experience.
- Use in conjunction with other network settings to create a robust and responsive network fault detection and recovery system.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1739, section: [RPCDoSDetection.Hitch]
- INI Section:
RPCDoSDetection.Hitch
- Raw value:
10
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEngine.ini:1747, section: [RPCDoSDetection.Burst]
- INI Section:
RPCDoSDetection.Burst
- Raw value:
8
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEngine.ini:1760, section: [RPCDoSDetection.PersistentBurst]
- INI Section:
RPCDoSDetection.PersistentBurst
- Raw value:
8
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEngine.ini:1776, section: [RPCDoSDetection.DoS]
- INI Section:
RPCDoSDetection.DoS
- Raw value:
11
- 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:291
Scope (from outer to inner):
file
function void FRPCDoSStateConfig::ValidateConfig
Source code excerpt:
(RPCRepeatLimitPerPeriod > 0 || RPCRepeatLimitMSPerPeriod > 0));
if (AutoEscalateTime > 0 && AutoEscalateTime < CooloffTime)
{
UE_LOG(LogNet, Warning, TEXT("FRPCDoSStateConfig: AutoEscalateTime must be larger than CooloffTime."));
}
}
int8 FRPCDoSStateConfig::GetHighestTimePeriod() const
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:322
Scope (from outer to inner):
file
function void FRPCDoSStateConfig::ApplyState
Source code excerpt:
Target.RPCRepeatLimitTimePeriod = RPCRepeatLimitTimePeriod;
Target.CooloffTime = CooloffTime;
Target.AutoEscalateTime = AutoEscalateTime;
Target.ApplyImpliedValues();
}
/**
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:794
Scope (from outer to inner):
file
function void FRPCDoSDetection::PreTickDispatch
Source code excerpt:
TickScope.UpdateSeverity(*this, ERPCDoSSeverityUpdate::Deescalate, ERPCDoSEscalateReason::Deescalate);
}
else if (AutoEscalateTime > 0 && ActiveStateTime > AutoEscalateTime)
{
TickScope.UpdateSeverity(*this, ERPCDoSSeverityUpdate::AutoEscalate, ERPCDoSEscalateReason::AutoEscalate);
}
}
if (ForcedRPCTrackingEndTime != 0.0 && (TimeSeconds - ForcedRPCTrackingEndTime) > 0.0)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:243
Scope: file
Source code excerpt:
/** The amount of time, in seconds, spent in the current DoS severity category before it automatically escalates to the next category */
UPROPERTY(config)
int16 AutoEscalateTime = -1;
/** Cached/converted values */
/** EscalateTimeQuotaMSPerFrame converted to seconds */
double EscalateTimeQuotaSecsPerFrame = 0.0;
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Connection/EscalationStates.cpp:15
Scope (from outer to inner):
file
function void FEscalationState::ValidateConfigInternal
Source code excerpt:
Super::ValidateConfigInternal();
if (AutoEscalateTime > 0 && AutoEscalateTime < CooloffTime)
{
UE_LOG(LogNetCore, Warning, TEXT("FEscalationState: AutoEscalateTime must be larger than CooloffTime."));
}
}
void FEscalationState::ValidateTimePeriod(int8& Value, const TCHAR* PropertyName, EValidateTime Requirement/*=EValidateTime::Optional*/)
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Connection/EscalationStates.cpp:326
Scope (from outer to inner):
file
namespace UE
namespace Net
function void FEscalationManager::TickRealtime
Source code excerpt:
double ActiveStateTime = TimeSeconds - LastMetEscalationConditions;
const double& CooloffTime = State->CooloffTime;
const double& AutoEscalateTime = State->AutoEscalateTime;
bool bUpdatedState = false;
if (CooloffTime > 0 && ActiveStateTime > CooloffTime)
{
bUpdatedState = UpdateSeverity(ESeverityUpdate::Deescalate, EEscalateReason::Deescalate) != EEscalateResult::NoChange;
}
if (!bUpdatedState && AutoEscalateTime > 0 && ActiveStateTime > AutoEscalateTime)
{
UpdateSeverity(ESeverityUpdate::AutoEscalate, EEscalateReason::AutoEscalate);
}
}
// NOTE: This timing is only approximate, and e.g. if there is a 10 second hitch during the previous Tick,
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Connection/NetConnectionFaultRecoveryBase.cpp:52
Scope (from outer to inner):
file
function EInitStateDefaultsResult FNetFaultState::InitConfigDefaultsInternal
Source code excerpt:
EscalateQuotaTimePeriod = 8;
CooloffTime = 10;
AutoEscalateTime = 11;
}
else if (SeverityCategory == TEXT("PersistentFault"))
{
EscalateQuotaFaultsPerPeriod = 64;
EscalateQuotaFaultPercentPerPeriod = 50;
DescalateQuotaFaultsPerPeriod = 48;
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Connection/NetConnectionFaultRecoveryBase.cpp:62
Scope (from outer to inner):
file
function EInitStateDefaultsResult FNetFaultState::InitConfigDefaultsInternal
Source code excerpt:
EscalateQuotaTimePeriod = 8;
CooloffTime = 10;
AutoEscalateTime = 20;
bLogEscalate = true;
}
else if (SeverityCategory == TEXT("DisconnectCountdown"))
{
EscalateQuotaFaultPercentPerPeriod = 70;
DescalateQuotaFaultPercentPerPeriod = 56;
EscalateQuotaTimePeriod = 16;
CooloffTime = 10;
AutoEscalateTime = 60;
bLogEscalate = true;
}
else if (SeverityCategory == TEXT("Disconnect"))
{
bCloseConnection = true;
bLogEscalate = true;
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Public/Net/Core/Connection/EscalationStates.h:186
Scope: file
Source code excerpt:
/** The amount of time, in seconds, spent in the current severity state before it automatically escalates to the next state */
UPROPERTY(config)
int16 AutoEscalateTime = -1;
protected:
/** Cached runtime config values (UPROPERTY's are copied to FEscalationManager.State during ApplyState, everything else is not) */
/** Cached value for the highest time period in this config state */