Navigation
API > API/Runtime > API/Runtime/Engine
Central class for handling all Player/NetConnection ping collection and calculation. Can work with any NetDriver type (except ICMP), but restricted to GameNetDriver for now.
| Name | FNetPing |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Net/NetPing.h |
| Include Path | #include "Net/NetPing.h" |
Syntax
class FNetPing
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNetPing () |
Net/NetPing.h | ||
FNetPing
(
UNetConnection* InOwner |
FNetPing | Net/NetPing.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FNetPing() |
Net/NetPing.h |
Classes
| Name | Remarks |
|---|---|
| FAverageStorageBase | |
| FMovingAverageStorage | |
| FNoAverageStorage | |
| FPlayerStateAvgStorage | Implements storage and calculation duplicating original PlayerState ping code, for backwards-compatible/representative comparison. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedRemoteAddr | FString | Caches string value for the remote address | Net/NetPing.h | |
| NetPingICMP | TSharedPtr< Private::FNetPingICMP > | Pointer to the ICMP ping handler, if set (only one ICMP handler instance can exist, held by the GameNetDriver client) | Net/NetPing.h | |
| NetPingUDPQoS | TSharedPtr< Private::FNetPingUDPQoS > | Pointer to a UDP ping handler, if set (no restrictions on the number of UDP handler instances nor supported drivers) | Net/NetPing.h | |
| NextPingTimerICMPTimestamp | double | The next time to perform an ICMP ping | Net/NetPing.h | |
| NextPingTimerUDPTimestamp | double | The next time to perform a UDP ping | Net/NetPing.h | |
| NextRemoteAddrCheckTimestamp | double | The next time the remote address should be updated | Net/NetPing.h | |
| OverridePingAddressCount | int32 | The number of times a ping address was overridden. Used to limit the number of changes. | Net/NetPing.h | |
| OverridePingICMPAddress | FString | Overrides the address to use for ICMP pings (set by server) | Net/NetPing.h | |
| OverridePingUDPQoSAddress | FString | Overrides the address to use for UDPQoS pings (set by server) | Net/NetPing.h | |
| OverridePingUDPQosPort | int32 | Overrides the port to use for UDPQoS pings (set by server) | Net/NetPing.h | |
| Owner | TObjectPtr< UNetConnection > | The NetConnection which owns this ping handler | Net/NetPing.h | |
| PingAverageStorageIdx | uint8 | Specifies the index into a storage TArray, for each EPingType index | Net/NetPing.h | |
| PingAverageTypes | EPingAverageType | Specifies the type of averaging to use for each EPingType index | Net/NetPing.h | |
| PingMovingAverageStorage | TArray< FMovingAverageStorage > | Storage used for EPingType's that use a moving average | Net/NetPing.h | |
| PingNoAverageStorage | TArray< FNoAverageStorage > | Storage used for EPingType's that don't use averaging | Net/NetPing.h | |
| PingPlayerStateAvgStorage | TArray< FPlayerStateAvgStorage > | Storage used for EPingType's that use PlayerState ping code averaging | Net/NetPing.h | |
| PingTypes | EPingType | Flags specifying the ping types that are enabled | Net/NetPing.h | |
| WeakRemoteAddr | TWeakPtr< const FInternetAddr > | Weak reference to the remote address, for checking if it has changed | Net/NetPing.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EPingType GetPingTypes() |
Returns the list of enabled ping types. | Net/NetPing.h | |
FPingValues GetPingValues
(
EPingType PingType |
Retrieves the ping results for the specified ping type, in seconds. | Net/NetPing.h | |
void TickRealtime
(
double CurTimeSeconds |
Ticks the ping handler. | Net/NetPing.h | |
void UpdatePing
(
EPingType PingType, |
Updates the value of the specified ping type, with a new ping reading (in seconds). | Net/NetPing.h | |
void UpdatePingTimeout
(
EPingType PingType |
Records a ping timeout, for the specified ping type. | Net/NetPing.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TPimplPtr< FNetPing > CreateNetPing
(
UNetConnection* InOwner |
Creates a new FNetPing instance, owned by the specified NetConnection. | Net/NetPing.h | |
static void HandleNetPingControlMessage
(
UNetConnection* Connection, |
Handles NMT_NetPing control channel messages, serverside/clientside. | Net/NetPing.h |