UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::FNetPing Class Reference

#include <NetPing.h>

Public Member Functions

 ~FNetPing ()
 
void UpdatePing (EPingType PingType, double TimeVal, double PingValue)
 
void UpdatePingTimeout (EPingType PingType)
 
ENGINE_API FPingValues GetPingValues (EPingType PingType) const
 
void TickRealtime (double CurTimeSeconds)
 
EPingType GetPingTypes () const
 

Static Public Member Functions

static TPimplPtr< FNetPingCreateNetPing (UNetConnection *InOwner)
 
static ENGINE_API void HandleNetPingControlMessage (UNetConnection *Connection, ENetPingControlMessage MessageType, FString MessageStr)
 

Friends

template<typename T >
struct UE::Core::Private::PimplPtr::TPimplHeapObjectImpl
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~FNetPing()

UE::Net::FNetPing::~FNetPing ( )

Member Function Documentation

◆ CreateNetPing()

TPimplPtr< FNetPing > UE::Net::FNetPing::CreateNetPing ( UNetConnection InOwner)
static

Creates a new FNetPing instance, owned by the specified NetConnection. NOTE: Presently only enabled for GameNetDriver, but can support other NetDriver's (except ICMP ping).

Parameters
InOwnerThe owner of the new FNetPing instance.
Returns
Returns the new FNetPing instance, or nullptr if disabled. Uses TPimplPtr for compatibility with forward-declare.

◆ GetPingTypes()

EPingType UE::Net::FNetPing::GetPingTypes ( ) const
inline

Returns the list of enabled ping types.

◆ GetPingValues()

FPingValues UE::Net::FNetPing::GetPingValues ( EPingType  PingType) const

Retrieves the ping results for the specified ping type, in seconds.

Parameters
PingTypeThe type of ping to retrieve results for.
Returns
Returns the ping results for the specified type, in seconds.

◆ HandleNetPingControlMessage()

void UE::Net::FNetPing::HandleNetPingControlMessage ( UNetConnection Connection,
ENetPingControlMessage  MessageType,
FString  MessageStr 
)
static

Handles NMT_NetPing control channel messages, serverside/clientside.

Parameters
ConnectionThe connection that received the message
MessageTypeThe type of message received
MessageStrThe message content.

◆ TickRealtime()

void UE::Net::FNetPing::TickRealtime ( double  CurTimeSeconds)

Ticks the ping handler.

Parameters
CurTimeSecondsThe current time in seconds.

◆ UpdatePing()

void UE::Net::FNetPing::UpdatePing ( EPingType  PingType,
double  TimeVal,
double  PingValue 
)

Updates the value of the specified ping type, with a new ping reading (in seconds).

Parameters
PingTypeThe type of ping being updated.
TimeValThe time that the ping reading was calculated.
PingValueThe value of the new ping reading, in seconds.

◆ UpdatePingTimeout()

void UE::Net::FNetPing::UpdatePingTimeout ( EPingType  PingType)

Records a ping timeout, for the specified ping type.

Parameters
PingTypeThe type of ping which timed out.

Friends And Related Symbol Documentation

◆ UE::Core::Private::PimplPtr::TPimplHeapObjectImpl


The documentation for this class was generated from the following files: