net.NetPingTypes

net.NetPingTypes

#Overview

name: net.NetPingTypes

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of net.NetPingTypes is to configure the types of network pings and their associated averaging methods in Unreal Engine’s networking system. This setting variable allows developers to specify which ping types should be enabled and how their values should be averaged.

Regarding the associated variable CVarNetPingTypes:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/NetPing.cpp:36

Scope (from outer to inner):

file
namespace    UE::Net

Source code excerpt:


static TAutoConsoleVariable<FString> CVarNetPingTypes(
	TEXT("net.NetPingTypes"), TEXT(""),
	TEXT("A comma-delimited list of EPingType pings to enable, and (optionally) the EPingAverageType averaging to apply to the ping ")
	TEXT("(e.g: \"RoundTrip=None,RoundTripExclFrame=PlayerStateAvg,ICMP=MovingAverage\")."));

static int32 GNetPingICMPInterval = 5.0;

static FAutoConsoleVariableRef CVarNetPingICMPInterval(

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/NetPing.cpp:35

Scope (from outer to inner):

file
namespace    UE::Net

Source code excerpt:

	TEXT("(Valid values: 0 = Off, 1 = Enabled for client, 2 = Enabled for server and client, 3 = Enabled for server only)"));

static TAutoConsoleVariable<FString> CVarNetPingTypes(
	TEXT("net.NetPingTypes"), TEXT(""),
	TEXT("A comma-delimited list of EPingType pings to enable, and (optionally) the EPingAverageType averaging to apply to the ping ")
	TEXT("(e.g: \"RoundTrip=None,RoundTripExclFrame=PlayerStateAvg,ICMP=MovingAverage\")."));

static int32 GNetPingICMPInterval = 5.0;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/NetPing.cpp:336

Scope (from outer to inner):

file
namespace    UE::Net
function     void FNetPing::Init

Source code excerpt:

	static EPingAverageType LastPingAverageTypes[static_cast<uint32>(EPingType::Count)] = { EPingAverageType::None };

	FString PingTypesCVar = CVarNetPingTypes.GetValueOnAnyThread();

	if (UNLIKELY(LastPingTypesCVar != PingTypesCVar))
	{
		LastPingTypesCVar = PingTypesCVar;

		TArray<FString> PingTypeList;