UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TPacketLossData< NbPeriodsForAverage > Struct Template Reference

#include <NetAnalyticsTypes.h>

Public Member Functions

float GetLossPercentage () const
 
float GetAvgLossPercentage () const
 
void UpdateLoss (int32 NbPacketsLost, int32 TotalPackets, int32 SampleCount)
 

Detailed Description

template<uint32 NbPeriodsForAverage>
struct TPacketLossData< NbPeriodsForAverage >

Calculates the current packet loss along with a rolling average of the past X updates Constructed with the number of samples you want to average over time.

Member Function Documentation

◆ GetAvgLossPercentage()

template<uint32 NbPeriodsForAverage>
float TPacketLossData< NbPeriodsForAverage >::GetAvgLossPercentage ( ) const
inline

The average loss percentage over the previous X StatPeriods

◆ GetLossPercentage()

template<uint32 NbPeriodsForAverage>
float TPacketLossData< NbPeriodsForAverage >::GetLossPercentage ( ) const
inline

The loss percentage over the last StatPeriod

◆ UpdateLoss()

template<uint32 NbPeriodsForAverage>
void TPacketLossData< NbPeriodsForAverage >::UpdateLoss ( int32  NbPacketsLost,
int32  TotalPackets,
int32  SampleCount 
)
inline

Update the packet loss based on total and lost packets


The documentation for this struct was generated from the following file: