FPacketSimulationSettings

Holds the packet simulation settings in one place

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/NetDriver.h

Include

#include "Engine/NetDriver.h"

Syntax

struct FPacketSimulationSettings

Remarks

Holds the packet simulation settings in one place

Variables

Name Description

Public variable

int32

 

PktDup

When set, will cause calls to FlushNet to duplicate packets.

Public variable

int32

 

PktIncomingLagMax

The maximum delay in milliseconds to add to incoming packets before they are processed.

Public variable

int32

 

PktIncomingLagMin

Set a value to add a minimum delay in milliseconds to incoming packets before they are processed.

Public variable

int32

 

PktIncomingLoss

The ratio of incoming packets that will be dropped to simulate packet loss

Public variable

int32

 

PktJitter

Causes sent packets to have a variable latency that fluctuates from [PktLagMin] to [PktLagMin+PktJitter] Note that this will cause packet loss on the receiving end.

Public variable

int32

 

PktLag

When set, will cause calls to FlushNet to delay packets.

Public variable

int32

 

PktLagMax

Public variable

int32

 

PktLagMin

If set lag values will randomly fluctuate between Min and Max. Ignored if PktLag value is set

Public variable

int32

 

PktLagVariance

When set, will cause PktLag to use variable lag instead of constant.

Public variable

int32

 

PktLoss

When set, will cause calls to FlushNet to drop packets.

Public variable

int32

 

PktLossMaxSize

Sets the maximum size of packets in bytes that will be dropped according to the PktLoss setting.

Public variable

int32

 

PktLossMinSize

Sets the minimum size of packets in bytes that will be dropped according to the PktLoss setting.

Public variable

int32

 

PktOrder

When set, will cause calls to FlushNet to change ordering of packets at random.

Functions

Name Description

Public function

void

 

ApplySettings

(
    const FPacketSimulationSettings & N...
)

Force new emulation settings and ignore config or cmdline values

Public function

bool

 

ConfigHelperBool

(
    const TCHAR * Name,
    bool & Value,
    const TCHAR * OptionalQualifier
)

Public function

bool

 

ConfigHelperInt

(
    const TCHAR * Name,
    int32 & Value,
    const TCHAR * OptionalQualifier
)

Public function

void

 

LoadConfig

(
    const TCHAR * OptionalQualifier
)

Reads in settings from the .ini file

: overwrites all previous settings

Public function

bool

 

LoadEmulationProfile

(
    const TCHAR * ProfileName
)

Load a preconfigured emulation profile from the .ini Returns true if the given profile existed

Public function

bool

 

ParseHelper

(
    const TCHAR * Cmd,
    const TCHAR * Name,
    int32 & Value,
    const TCHAR * OptionalQualifier
)

Public function

bool

 

ParseSettings

(
    const TCHAR * Stream,
    const TCHAR * OptionalQualifier
)

Reads the settings from a string: command line or an exec

Public function

void

 

ResetSettings()

Public function Const

bool

 

ShouldDropPacketOfSize

(
    int32 NumBits
)

Tells if a packet fits the size settings to potentially be dropped

Public function

void

 

ValidateSettings()

Ensure that settings have proper values

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback