Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | TPacketLossData |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Net/NetAnalyticsTypes.h |
| Include Path | #include "Net/NetAnalyticsTypes.h" |
Syntax
template<uint32 NbPeriodsForAverage>
struct TPacketLossData
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AvgLossPercentage | float | Net/NetAnalyticsTypes.h | ||
| LossPercentage | float | Net/NetAnalyticsTypes.h | ||
| LossSamples | float | The amount of samples to average. | Net/NetAnalyticsTypes.h | |
| TotalPacketsAtPeriodStart | int32 | Net/NetAnalyticsTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetAvgLossPercentage() |
The average loss percentage over the previous X StatPeriods | Net/NetAnalyticsTypes.h | |
float GetLossPercentage() |
The loss percentage over the last StatPeriod | Net/NetAnalyticsTypes.h | |
void UpdateLoss
(
int32 NbPacketsLost, |
Update the packet loss based on total and lost packets | Net/NetAnalyticsTypes.h |