net.RPCDoSAnalyticsMaxRPCs
net.RPCDoSAnalyticsMaxRPCs
#Overview
name: net.RPCDoSAnalyticsMaxRPCs
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
The top \'x\' number of RPC\'s to include in RPC DoS analytics, ranked by RPC rate per Second.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of net.RPCDoSAnalyticsMaxRPCs is to control the number of Remote Procedure Calls (RPCs) included in the RPC Denial of Service (DoS) analytics system. It specifically sets the maximum number of RPCs to be tracked and analyzed, ranked by their rate per second.
This setting variable is primarily used by the networking and analytics subsystems of Unreal Engine. Based on the callsites, it’s specifically utilized in the RPCDoSDetectionAnalytics module, which is part of the Engine’s runtime.
The value of this variable is set as a console variable with a default value of 20. It can be modified at runtime through the console or configuration files.
The associated variable CVarRPCDoSAnalyticsMaxRPCs directly interacts with net.RPCDoSAnalyticsMaxRPCs. It’s an instance of TAutoConsoleVariable
Developers must be aware that this variable affects the granularity of RPC DoS detection. Setting it too low might miss important RPC patterns, while setting it too high could increase memory usage and processing overhead.
Best practices when using this variable include:
- Adjusting it based on the specific needs of your game’s networking requirements.
- Monitoring performance impact when increasing the value.
- Using it in conjunction with other DoS prevention mechanisms for comprehensive protection.
Regarding the associated variable CVarRPCDoSAnalyticsMaxRPCs:
- Its purpose is to provide programmatic access to the net.RPCDoSAnalyticsMaxRPCs value within the C++ code.
- It’s used in the Engine’s analytics system, specifically in the RPCDoSDetectionAnalytics module.
- Its value is set when the console variable is initialized and can be accessed using the GetValueOnAnyThread() method.
- It directly interacts with the net.RPCDoSAnalyticsMaxRPCs console variable.
- Developers should be aware that changes to the console variable will be reflected in this associated variable.
- Best practices include using GetValueOnAnyThread() for thread-safe access to the current value, and considering caching the value if it’s accessed frequently in performance-critical sections.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:22
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarRPCDoSAnalyticsMaxRPCs(
TEXT("net.RPCDoSAnalyticsMaxRPCs"), 20,
TEXT("The top 'x' number of RPC's to include in RPC DoS analytics, ranked by RPC rate per Second."));
namespace UE
{
namespace Net
#Associated Variable and Callsites
This variable is associated with another variable named CVarRPCDoSAnalyticsMaxRPCs
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:21
Scope: file
Source code excerpt:
*/
TAutoConsoleVariable<int32> CVarRPCDoSAnalyticsMaxRPCs(
TEXT("net.RPCDoSAnalyticsMaxRPCs"), 20,
TEXT("The top 'x' number of RPC's to include in RPC DoS analytics, ranked by RPC rate per Second."));
namespace UE
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:58
Scope (from outer to inner):
file
function FRPCDoSAnalyticsVars::FRPCDoSAnalyticsVars
Source code excerpt:
FRPCDoSAnalyticsVars::FRPCDoSAnalyticsVars()
: RPCTrackingAnalytics()
, MaxRPCAnalytics(CVarRPCDoSAnalyticsMaxRPCs.GetValueOnAnyThread())
{
}
bool FRPCDoSAnalyticsVars::operator == (const FRPCDoSAnalyticsVars& A) const
{
return PlayerIP == A.PlayerIP && PlayerUID == A.PlayerUID && MaxSeverityIndex == A.MaxSeverityIndex &&