net.RPCDoSScopeDebugging

net.RPCDoSScopeDebugging

#Overview

name: net.RPCDoSScopeDebugging

This variable is created as a Console Variable (cvar).

It is referenced in 12 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of net.RPCDoSScopeDebugging is to control whether debugging and ensures for RPC DoS (Denial of Service) Tick/Packet scopes should be enabled. This setting is primarily used for debugging and ensuring the correct functionality of the RPC DoS detection system in Unreal Engine’s networking subsystem.

Regarding the associated variable GRPCDoSScopeDebugging:

The purpose of GRPCDoSScopeDebugging is to store the actual value that determines whether RPC DoS scope debugging is enabled. It is an integer variable that is directly accessed in the code to perform debug checks.

#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:79

Scope (from outer to inner):

file
namespace    UE::Net

Source code excerpt:


	FAutoConsoleVariableRef CVarRPCDoSScopeDebugging(
		TEXT("net.RPCDoSScopeDebugging"),
		GRPCDoSScopeDebugging,
		TEXT("Sets whether or not debugging/ensures for RPC DoS Tick/Packet scopes should be enabled."));
}
#endif

#Associated Variable and Callsites

This variable is associated with another variable named GRPCDoSScopeDebugging. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:76

Scope (from outer to inner):

file
namespace    UE::Net

Source code excerpt:

namespace UE::Net
{
	int32 GRPCDoSScopeDebugging = 0;

	FAutoConsoleVariableRef CVarRPCDoSScopeDebugging(
		TEXT("net.RPCDoSScopeDebugging"),
		GRPCDoSScopeDebugging,
		TEXT("Sets whether or not debugging/ensures for RPC DoS Tick/Packet scopes should be enabled."));
}
#endif


/**

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:996

Scope (from outer to inner):

file
function     void FRPCDoSDetection::PostReceivedRPCPacket

Source code excerpt:

#if RPC_DOS_SCOPE_DEBUG
		// If this ensure fails, there is the potential for a crash - seen very rarely, and the Tick/Packet/SequentialRPC scoping should eliminate it
		ensure(GRPCDoSScopeDebugging == 0 || (RPCTracking.Num() > 0 && ActiveRPCTracking.Num() > 0));
#endif

		if (RPCTracking.Num() > 0 && ActiveRPCTracking.Num() > 0)
		{
			PostSequentialRPC(EPostSequentialRPCType::PostPacket, TimeSeconds, SequentialRPCScope.PostReceivedRPCCounter,
								SequentialRPCScope.PostReceivedRPCTracking);

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:1013

Scope (from outer to inner):

file
function     void FRPCDoSDetection::PostReceivedRPCPacket

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
	ensure(GRPCDoSScopeDebugging == 0 || SequentialRPCScopePrivate.IsActive());
	ensure(GRPCDoSScopeDebugging == 0 || PacketScopePrivate.IsActive());
	ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
#endif

	SequentialRPCScopePrivate.SetActive(false);
}

void FRPCDoSDetection::PostTickDispatch()

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:50

Scope (from outer to inner):

file
namespace    UE::Net

Source code excerpt:

{
	/** Whether or not debugging/ensures for RPC DoS Tick/Packet scopes should be enabled */
	extern int32 GRPCDoSScopeDebugging;
}
#endif


// Structs

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:499

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     void PreReceivedPacket

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
		ensure(GRPCDoSScopeDebugging == 0 || !SequentialRPCScopePrivate.IsActive());
#endif

		PacketScopePrivate.SetActive(true);

		FPacketScope& PacketScope = GetPacketScope();

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:664

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     void PostReceivedPacket

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || !SequentialRPCScopePrivate.IsActive());
		ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
#endif
	}

	/**
	 * Called after the current NetConnection receives a packet, when RPC DoS Detection is active and the packet contains an RPC.
	 * NOTE: Timing is approximate - may include multiple-RPC and non-RPC packet processing time - but low cost

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:741

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     void PreSequentialRPC

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
		ensure(GRPCDoSScopeDebugging == 0 || PacketScopePrivate.IsActive());
#endif

		SequentialRPCScopePrivate.SetActive(true);
	}

	/**

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:918

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
class        class TScopeBase
function     inline void SetActive

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
			ensure(GRPCDoSScopeDebugging == 0 || bScopeActive != bInVal);
#endif

			bScopeActive = bInVal;

			Reset();
		}

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:985

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     inline FTickScope& GetTickScope

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
#endif

		return TickScopePrivate;
	}

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:1021

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     inline FPacketScope& GetPacketScope

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || PacketScopePrivate.IsActive());
#endif

		return PacketScopePrivate;
	}

	/** Variables and functions that should only be accessible while receiving the same RPC individually/sequentially */

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/Net/RPCDoSDetection.h:1116

Scope (from outer to inner):

file
class        class FRPCDoSDetection : protected FRPCDoSState
function     inline FSequentialRPCScope& GetSequentialRPCScope

Source code excerpt:


#if RPC_DOS_SCOPE_DEBUG
		ensure(GRPCDoSScopeDebugging == 0 || SequentialRPCScopePrivate.IsActive());
#endif

		return SequentialRPCScopePrivate;
	}