![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Engine/NetDriver.h"#include "AnalyticsEventAttribute.h"#include "Engine/GameInstance.h"#include "Engine/ServerStatReplicator.h"#include "Misc/App.h"#include "EngineStats.h"#include "GameFramework/GameModeBase.h"#include "Misc/ConfigCacheIni.h"#include "Net/Core/NetHandle/NetHandleManager.h"#include "Net/Core/PropertyConditions/RepChangedPropertyTracker.h"#include "UObject/UObjectIterator.h"#include "Net/Core/Trace/Private/NetTraceInternal.h"#include "PacketHandlers/StatelessConnectHandlerComponent.h"#include "Engine/LocalPlayer.h"#include "DrawDebugHelpers.h"#include "Stats/StatsTrace.h"#include "UnrealEngine.h"#include "EngineUtils.h"#include "Net/NetworkProfiler.h"#include "Engine/PackageMapClient.h"#include "Net/NetIDVariant.h"#include "Net/RepLayout.h"#include "Net/DataReplication.h"#include "Engine/ControlChannel.h"#include "Engine/ActorChannel.h"#include "Engine/VoiceChannel.h"#include "Engine/NetworkObjectList.h"#include "GameFramework/GameNetworkManager.h"#include "Net/OnlineEngineInterface.h"#include "NetworkingDistanceConstants.h"#include "Engine/ChildConnection.h"#include "Net/Core/Trace/NetTrace.h"#include "Net/Core/Misc/GuidReferences.h"#include "Net/Core/PropertyConditions/PropertyConditions.h"#include "Net/DataChannel.h"#include "GameFramework/PlayerState.h"#include "Net/PerfCountersHelpers.h"#include "Stats/StatsMisc.h"#include "Engine/ReplicationDriver.h"#include "Engine/LevelScriptActor.h"#include "Engine/NetworkSettings.h"#include "Net/NetEmulationHelper.h"#include "Net/NetworkMetricsDatabase.h"#include "Net/NetworkMetricsDefs.h"#include "Net/NetworkMetricsConfig.h"#include "Net/NetworkMetricsMutators.h"#include "Net/NetSubObjectRegistryGetter.h"#include "Net/NetworkGranularMemoryLogging.h"#include "Templates/Greater.h"#include "UObject/RemoteExecutor.h"#include "UObject/Stack.h"#include "Iris/IrisConfig.h"#include "Iris/Core/IrisDebugging.h"#include "Iris/Core/IrisProfiler.h"#include "Iris/Core/IrisMemoryTracker.h"#include "Net/Experimental/Iris/DataStreamChannel.h"#include "Iris/ReplicationSystem/ObjectReplicationBridge.h"#include "Iris/ReplicationSystem/ReplicationSystem.h"#include "Iris/ReplicationSystem/ReplicationView.h"#include "Iris/ReplicationSystem/Filtering/NetObjectFilter.h"#include "Net/Iris/ReplicationSystem/EngineReplicationBridge.h"#include "Net/Iris/ReplicationSystem/ReplicationSystemUtil.h"#include "Iris/ReplicationSystem/NameTokenStore.h"#include "Iris/ReplicationSystem/StringTokenStore.h"#include "GameplayTagTokenStore.h"#include "Interfaces/ReplicatedObjectInterface.h"#include "GenericPlatform/GenericPlatformCrashContext.h"#include "HAL/LowLevelMemStats.h"#include "UObject/Package.h"Classes | |
| struct | UE::Net::Private::FAutoDestructProperty |
| struct | UE::Net::FServerReplicateActors_ForConnectionParams |
| struct | FRPCCSVTracker |
| struct | FRPCCSVTracker::FItem |
| struct | FReplicationAutoCapture |
Namespaces | |
| namespace | UE |
| namespace | UE::Net |
| namespace | UE::Net::Private |
| namespace | NetCmds |
Macros | |
| #define | DEBUG_REMOTEFUNCTION(Format, ...) UE_LOG(LogNet, VeryVerbose, Format, __VA_ARGS__); |
| #define | RPC_CSV_TRACKER (CSV_PROFILER_STATS && WITH_SERVER_CODE) |
| #define | UpdatePerClientMinMaxAvg(VariableName) |
Variables | |
| int32 | GNumSaturatedConnections |
| int32 | GNumSharedSerializationHit |
| int32 | GNumSharedSerializationMiss |
| int32 | GNumSkippedObjectEmptyUpdates |
| int32 | GNumReplicationViewers |
| int32 | GNetRPCDebug |
| int32 | UE::Net::Private::SendDormantDestructionOnRemoval = 1 |
| bool | UE::Net::Private::bUpdateReplicationSystemWithNoConnections = true |
| FAutoConsoleCommandWithWorld | UE::Net::Private::DumpActiveNetActorsCommand (TEXT("net.DumpActiveNetActors"), TEXT("Dumps all of the active net actors in the replication system."), FConsoleCommandWithWorldDelegate::CreateStatic(DumpActiveNetActors)) |
| FAutoConsoleVariableRef | UE::Net::CVarNetDiscardTornOffActorRPCs (TEXT("net.DiscardTornOffActorRPCs"), bDiscardTornOffActorRPCs, TEXT("If enabled, discard RPCs if the actor has been torn off."), ECVF_Default) |
| int32 | GSetNetDormancyEnabled = 1 |
| int32 | GNetDormancyValidate = 0 |
| bool | GbNetReuseReplicatorsForDormantObjects = false |
| TAutoConsoleVariable< int32 > | CVarNetAllowEncryption (TEXT("net.AllowEncryption"), 1, TEXT("(0 = Disabled, 1 = Allowed (default), 2 = Required)")) |
| bool | CVar_NetDriver_ReportGameTickFlushTime = false |
| double | GTickFlushGameDriverTimeSeconds = 0.0 |
| struct FRPCCSVTracker | GRPCCSVTracker |
| double | GReplicationGatherPrioritizeTimeSeconds |
| double | GServerReplicateActorTimeSeconds |
| int32 | GNumClientConnections |
| int32 | GNumClientUpdateLevelVisibility |
| FReplicationAutoCapture | GReplicationAutoCapture |
| int32 | CVar_RepDriver_Enable = 1 |
| FStaticSelfRegisteringExec | NetDriverExecRegistration (NetDriverExec) |
| FAutoConsoleCommand | UE::Net::Private::PrintNetConnectionInfoCommand (TEXT("net.PrintNetConnections"), TEXT("Prints information on all net connections of a NetDriver. Defaults to the GameNetDriver. Choose a different driver via NetDriverName= or NetDriverDefinition="), FConsoleCommandWithArgsDelegate::CreateLambda([](const TArray< FString > &Args) { FName NetDriverName;FName NetDriverDef=NAME_GameNetDriver;if(const FString *DriverNameStr=Args.FindByPredicate([](const FString &Str) { return Str.Contains(TEXT("NetDriverName="));})) { FParse::Value(**DriverNameStr, TEXT("NetDriverName="), NetDriverName);} else if(const FString *DriverDefStr=Args.FindByPredicate([](const FString &Str) { return Str.Contains(TEXT("NetDriverDef="));})) { FParse::Value(**DriverDefStr, TEXT("NetDriverDef="), NetDriverDef);} auto PrintNetConnections=[](UNetDriver *NetDriver) { if(NetDriver->ServerConnection) { UE_LOG(LogNet, Display, TEXT("Printing Server Connection for: %s (Definition=%s)"), *NetDriver->NetDriverName.ToString(), *NetDriver->GetNetDriverDefinition().ToString());UE_LOG(LogNet, Display, TEXT("\tServerConnection: ConnectionId=%u ViewTarget=%s FullDescription=%s Child=false"), NetDriver->ServerConnection->GetConnectionHandle().GetParentConnectionId(), *GetNameSafe(NetDriver->ServerConnection->ViewTarget), *NetDriver->ServerConnection->Describe());for(UNetConnection *ChildNetConnection :NetDriver->ServerConnection->Children) { UE_LOG(LogNet, Display, TEXT("\tServerConnection: ConnectionId=%u ViewTarget=%s FullDescription=%s Child=true"), ChildNetConnection->GetConnectionHandle().GetParentConnectionId(), *GetNameSafe(ChildNetConnection->ViewTarget), *ChildNetConnection->Describe());} } else { UE_LOG(LogNet, Display, TEXT("Printing Client Connections (%u) for: %s (Definition=%s)"), NetDriver->ClientConnections.Num(), *NetDriver->NetDriverName.ToString(), *NetDriver->GetNetDriverDefinition().ToString());for(UNetConnection *NetConnection :NetDriver->ClientConnections) { UE_LOG(LogNet, Display, TEXT("\tClientConnection: ConnectionId=%u ViewTarget=%s NetId=%s FullDescription=%s Child=false"), NetConnection->GetConnectionHandle().GetParentConnectionId(), *GetNameSafe(NetConnection->ViewTarget), *NetConnection->PlayerId.ToDebugString(), *NetConnection->Describe());for(UNetConnection *ChildNetConnection :NetConnection->Children) { UE_LOG(LogNet, Display, TEXT("\tClientConnection: ConnectionId=%u ViewTarget=%s NetId=%s FullDescription=%s Child=true"), ChildNetConnection->GetConnectionHandle().GetParentConnectionId(), *GetNameSafe(ChildNetConnection->ViewTarget), *ChildNetConnection->PlayerId.ToDebugString(), *ChildNetConnection->Describe());} } } };for(TObjectIterator< UNetDriver > It;It;++It) { if(UNetDriver *NetDriver= *It) { if(NetDriverName !=NAME_None) { if(NetDriver->NetDriverName==NetDriverName) { PrintNetConnections(NetDriver);} } else if(NetDriverDef !=NAME_None) { if(NetDriver->GetNetDriverDefinition()==NetDriverDef) { PrintNetConnections(NetDriver);} } else { PrintNetConnections(NetDriver);} } } })) |
| #define RPC_CSV_TRACKER (CSV_PROFILER_STATS && WITH_SERVER_CODE) |
| #define UpdatePerClientMinMaxAvg | ( | VariableName | ) |
| CSV_DECLARE_CATEGORY_MODULE_EXTERN | ( | NETCORE_API | , |
| Networking | |||
| ) |
| CSV_DEFINE_CATEGORY | ( | Replication | , |
| true | |||
| ) |
| CSV_DEFINE_CATEGORY | ( | ReplicationRPCs | , |
| WITH_SERVER_CODE | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("NetDriver AddClientConnection") | , |
| Stat_NetDriverAddClientConnection | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("NetDriver ProcessRemoteFunction") | , |
| STAT_NetProcessRemoteFunc | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("NetDriver TickFlush GatherStats") | , |
| STAT_NetTickFlushGatherStats | , | ||
| STATGROUP_Game | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("NetDriver TickFlush GatherStatsPerfCounters") | , |
| STAT_NetTickFlushGatherStatsPerfCounters | , | ||
| STATGROUP_Game | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("NetDriver TickFlush") | , |
| STAT_NetTickFlush | , | ||
| STATGROUP_Game | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Process Prioritized Actors Time") | , |
| STAT_NetProcessPrioritizedActorsTime | , | ||
| STATGROUP_Game | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("ReceiveRPC_ProcessRemoteFunction") | , |
| STAT_NetReceiveRPC_ProcessRemoteFunction | , | ||
| STATGROUP_Game | |||
| ) |
| DECLARE_DWORD_ACCUMULATOR_STAT | ( | TEXT("Net bunch time % overshoot frames") | , |
| STAT_NetInBunchTimeOvershootPercent | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("Empty Object Replicate Properties Skipped") | , |
| STAT_NumSkippedObjectEmptyUpdates | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("Num Saturated Connections") | , |
| STAT_NumSaturatedConnections | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("SharedSerialization Property Hit") | , |
| STAT_SharedSerializationPropertyHit | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("SharedSerialization Property Miss") | , |
| STAT_SharedSerializationPropertyMiss | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("SharedSerialization RPC Hit") | , |
| STAT_SharedSerializationRPCHit | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT | ( | TEXT("SharedSerialization RPC Miss") | , |
| STAT_SharedSerializationRPCMiss | , | ||
| STATGROUP_Net | |||
| ) |
| DECLARE_LLM_MEMORY_STAT | ( | TEXT("NetDriver") | , |
| STAT_NetDriverLLM | , | ||
| STATGROUP_LLMFULL | |||
| ) |
| DEFINE_LOG_CATEGORY_STATIC | ( | LogNetSyncLoads | , |
| Log | , | ||
| All | |||
| ) |
| DEFINE_STAT | ( | STAT_Channels | ) |
| DEFINE_STAT | ( | STAT_ImportedNetGuids | ) |
| DEFINE_STAT | ( | STAT_InBunches | ) |
| DEFINE_STAT | ( | STAT_IncomingReliableMessageQueueMaxSize | ) |
| DEFINE_STAT | ( | STAT_InLoss | ) |
| DEFINE_STAT | ( | STAT_InPackets | ) |
| DEFINE_STAT | ( | STAT_InPacketsClientAvg | ) |
| DEFINE_STAT | ( | STAT_InPacketsClientMax | ) |
| DEFINE_STAT | ( | STAT_InPacketsClientMin | ) |
| DEFINE_STAT | ( | STAT_InRate | ) |
| DEFINE_STAT | ( | STAT_InRateClientAvg | ) |
| DEFINE_STAT | ( | STAT_InRateClientMax | ) |
| DEFINE_STAT | ( | STAT_InRateClientMin | ) |
| DEFINE_STAT | ( | STAT_MaxPacket | ) |
| DEFINE_STAT | ( | STAT_MaxPacketMinusReserved | ) |
| DEFINE_STAT | ( | STAT_MaxPacketOverhead | ) |
| DEFINE_STAT | ( | STAT_NetGUIDInRate | ) |
| DEFINE_STAT | ( | STAT_NetGUIDOutRate | ) |
| DEFINE_STAT | ( | STAT_NetNumClients | ) |
| DEFINE_STAT | ( | STAT_NetSaturated | ) |
| DEFINE_STAT | ( | STAT_NumActorChannels | ) |
| DEFINE_STAT | ( | STAT_NumActors | ) |
| DEFINE_STAT | ( | STAT_NumConsideredActors | ) |
| DEFINE_STAT | ( | STAT_NumDormantActors | ) |
| DEFINE_STAT | ( | STAT_NumInitiallyDormantActors | ) |
| DEFINE_STAT | ( | STAT_NumNetActors | ) |
| DEFINE_STAT | ( | STAT_NumNetGUIDsAckd | ) |
| DEFINE_STAT | ( | STAT_NumNetGUIDsPending | ) |
| DEFINE_STAT | ( | STAT_NumNetGUIDsUnAckd | ) |
| DEFINE_STAT | ( | STAT_NumRelevantDeletedActors | ) |
| DEFINE_STAT | ( | STAT_NumReplicatedActorBytes | ) |
| DEFINE_STAT | ( | STAT_NumReplicatedActors | ) |
| DEFINE_STAT | ( | STAT_ObjPathBytes | ) |
| DEFINE_STAT | ( | STAT_OutBunches | ) |
| DEFINE_STAT | ( | STAT_OutgoingReliableMessageQueueMaxSize | ) |
| DEFINE_STAT | ( | STAT_OutLoss | ) |
| DEFINE_STAT | ( | STAT_OutPackets | ) |
| DEFINE_STAT | ( | STAT_OutPacketsClientAvg | ) |
| DEFINE_STAT | ( | STAT_OutPacketsClientMax | ) |
| DEFINE_STAT | ( | STAT_OutPacketsClientMin | ) |
| DEFINE_STAT | ( | STAT_OutRate | ) |
| DEFINE_STAT | ( | STAT_OutRateClientAvg | ) |
| DEFINE_STAT | ( | STAT_OutRateClientMax | ) |
| DEFINE_STAT | ( | STAT_OutRateClientMin | ) |
| DEFINE_STAT | ( | STAT_PacketReservedHandshake | ) |
| DEFINE_STAT | ( | STAT_PacketReservedNetConnection | ) |
| DEFINE_STAT | ( | STAT_PacketReservedPacketHandler | ) |
| DEFINE_STAT | ( | STAT_PacketReservedTotal | ) |
| DEFINE_STAT | ( | STAT_PendingOuterNetGuids | ) |
| DEFINE_STAT | ( | STAT_PercentInVoice | ) |
| DEFINE_STAT | ( | STAT_PercentOutVoice | ) |
| DEFINE_STAT | ( | STAT_Ping | ) |
| DEFINE_STAT | ( | STAT_PrioritizedActors | ) |
| DEFINE_STAT | ( | STAT_UnmappedReplicators | ) |
| DEFINE_STAT | ( | STAT_VoiceBytesRecv | ) |
| DEFINE_STAT | ( | STAT_VoiceBytesSent | ) |
| DEFINE_STAT | ( | STAT_VoicePacketsRecv | ) |
| DEFINE_STAT | ( | STAT_VoicePacketsSent | ) |
| void HandleNetFlushAllDormancy | ( | UNetDriver * | InNetDriver, |
| UWorld * | InWorld | ||
| ) |
| LLM_DEFINE_TAG | ( | NetDriver | , |
| NAME_None | , | ||
| TEXT("Networking") | , | ||
| GET_STATFNAME(STAT_NetDriverLLM) | , | ||
| GET_STATFNAME(STAT_NetworkingSummaryLLM) | |||
| ) |
| bool ShouldEnableScopeSecondsTimers | ( | ) |
| int32 CVar_RepDriver_Enable = 1 |
| TAutoConsoleVariable< int32 > CVarNetAllowEncryption(TEXT("net.AllowEncryption"), 1, TEXT("(0 = Disabled, 1 = Allowed (default), 2 = Required)")) | ( | TEXT("net.AllowEncryption") | , |
| 1 | , | ||
| TEXT("(0 = Disabled, 1 = Allowed (default), 2 = Required)") | |||
| ) |
| int32 GNetDormancyValidate = 0 |
|
extern |
| int32 GNumClientConnections |
| int32 GNumClientUpdateLevelVisibility |
| int32 GNumReplicationViewers |
| int32 GNumSaturatedConnections |
| int32 GNumSharedSerializationHit |
| int32 GNumSharedSerializationMiss |
| int32 GNumSkippedObjectEmptyUpdates |
| FReplicationAutoCapture GReplicationAutoCapture |
| double GReplicationGatherPrioritizeTimeSeconds |
| struct FRPCCSVTracker GRPCCSVTracker |
| double GServerReplicateActorTimeSeconds |
| int32 GSetNetDormancyEnabled = 1 |
| double GTickFlushGameDriverTimeSeconds = 0.0 |
Accounts for the network time we spent in the game driver.
| FStaticSelfRegisteringExec NetDriverExecRegistration(NetDriverExec) | ( | NetDriverExec | ) |
Our entry point for all net driver related exec routing