UNetConnection

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/NetConnection.h

Include

#include "Engine/NetConnection.h"

Syntax

class UNetConnection : public UPlayer

Variables

Name Description

Public variable

bool

 

AllowMerge

Public variable

FNetConnAnalyti...

 

AnalyticsVars

Net Analytics The locally cached/updated analytics variables, for the NetConnection - aggregated upon connection Close

Public variable

double

 

AverageFrameTime

The average frame delta time over the last 1 second period.

Public variable

float

 

AvgLag

Average lag seen during the last StatPeriod

Public variable

bool

 

bLastHasServerFrameTime

Public variable

bool

 

bNeedsByteSwapping

Whether this channel needs to byte swap all data or not

Public variable

uint32: 1

 

bPendingDestroy

Public variable

FString

 

Challenge

Public variable

TArray< TObject...

 

Channels

Public variable

TArray< TObject...

 

Children

Child connections for secondary viewports

Public variable

EClientLoginSta...

 

ClientLoginState

Login state tracking.

Public variable

FString

 

ClientResponse

Public variable

TSet< FName >

 

ClientVisibleLevelNames

On the server, the package names of streaming levels that the client has told us it has made visible the server will only replicate references to Actors in visible levels so that it's impossible to send references to Actors the client has not initialized

Public variable

int32

 

CountedFrames

Nb of stats accumulated in CumulativeTime

Public variable

double

 

CumulativeTime

Total frames times accumulator

Public variable

int32

 

DefaultMaxChannelSize

Public variable

TObjectPtr< cla...

 

Driver

Owning net driver

Public variable

uint8

 

ExpectedClientLoginMsgType

Public variable

double

 

FrameTime

Public variable

TUniquePtr< Pac...

 

Handler

PacketHandler, for managing layered handler components, which modify packets as they are sent/received

Public variable

int32

 

InBytes

Bytes sent/received on this connection (accumulated during a StatPeriod)

Public variable

int32

 

InBytesPerSecond

Bytes sent/received on this connection (per second) - these are from previous StatPeriod interval

Public variable

int32

 

InitInReliable

Public variable

int32

 

InitOutReliable

Public variable

int32

 

InPacketId

Public variable

int32

 

InPackets

Packets sent/received on this connection (accumulated during a StatPeriod)

Public variable

int32

 

InPacketsLost

Packets lost on this connection (accumulated during a StatPeriod)

Public variable

int32

 

InPacketsPerSecond

Packets sent/received on this connection (per second) - these are from previous StatPeriod interval

Public variable

int32

 

InPacketsThisFrame

Packets received in the current tick

Public variable

TArray< int32 >

 

InReliable

Public variable

int32

 

InTotalBytes

Total bytes sent/received on this connection

Public variable

int32

 

InTotalPackets

Total packets sent/received on this connection

Public variable

int32

 

InTotalPacketsLost

Total packets lost on this connection

Public variable

TMap< FNetworkG...

 

KeepProcessingActorChannelBunchesMap

This holds a list of actor channels that want to fully shutdown, but need to continue processing bunches before doing so

Public variable

double

 

LagAcc

Total accumulated lag values during the current StatPeriod

Public variable

int32

 

LagCount

Nb of stats accumulated in LagAcc

Public variable

FBitWriterMark

 

LastEnd

Public variable

double

 

LastGoodPacketRealtime

Public variable

FOutBunch

 

LastOut

Public variable

FOutBunch *

 

LastOutBunch

Public variable

uint32

 

LastProcessedFrame

Public variable

double

 

LastReceiveRealtime

Public variable

double

 

LastReceiveTime

Internal.

Public variable

double

 

LastSendTime

Public variable

FBitWriterMark

 

LastStart

Merge info.

Public variable

double

 

LastTickTime

Public variable

double

 

LastTime

Monitors frame time

Public variable

int32

 

LogCallCount

Public variable

double

 

LogCallLastTime

Log tracking.

Public variable

int32

 

LogSustainedCount

Public variable

FOnLowLevelSend

 

LowLevelSendDel

Delegate for hooking LowLevelSend

Public variable

int32

 

MaxPacket

Public variable

int32

 

MaxPacketHandlerBits

The maximum number of bits all packet handlers will reserve

Public variable

TNetAnalyticsDa...

 

NetAnalyticsData

The net analytics data holder for the NetConnection analytics, which is where analytics variables are aggregated upon Close

Protected variable

TOptional< FNet...

 

NetworkCongestionControl

Public variable

int

 

NumAckBits

Number of bits used for acks in the current packet.

Public variable

int

 

NumBunchBits

Number of bits used for bunches in the current packet.

Public variable

int

 

NumPacketIdBits

Number of bits used for the packet id in the current packet.

Public variable

int

 

NumPaddingBits

Number of bits used for padding in the current packet.

Public variable

TArray< TObject...

 

OpenChannels

Public variable

int32

 

OutAckPacketId

Public variable

int32

 

OutBytes

Public variable

int32

 

OutBytesPerSecond

Public variable

uint8[256]

 

OutBytesPerSecondHistory

Public variable

int32[256]

 

OutLagPacketId

Public variable

double[256]

 

OutLagTime

Public variable

int32

 

OutPacketId

Public variable

int32

 

OutPackets

Public variable

int32

 

OutPacketsLost

Public variable

int32

 

OutPacketsPerSecond

Public variable

int32

 

OutPacketsThisFrame

Packets sent in the current tick

Public variable

TArray< int32 >

 

OutReliable

Public variable

int32

 

OutTotalAcks

Total acks sent on this connection

Public variable

int32

 

OutTotalBytes

Public variable

int32

 

OutTotalPackets

Public variable

int32

 

OutTotalPacketsLost

Public variable

TObjectPtr< cla...

 

OwningActor

Reference to controlling actor (usually PlayerController)

Public variable

TObjectPtr< cla...

 

PackageMap

Package map between local and remote. (negotiates net serialization)

Public variable

TSubclassOf< UP...

 

PackageMapClass

The class name for the PackageMap to be loaded

Public variable

int32

 

PacketOverhead

Negotiated parameters.

Public variable

FPacketSimulati...

 

PacketSimulationSettings

Packet settings for testing lag, net errors, etc

Public variable

TArray< int32 >

 

PendingOutRec

Public variable

FUniqueNetIdRep...

 

PlayerId

Net id of remote player on this connection. Only valid on client connections (server side).

Public variable

int32

 

QueuedBits

Public variable

FOnReceivedRawP...

 

ReceivedRawPacketDel

Delegate for hooking ReceivedRawPacket

Public variable

TSharedPtr< FIn...

 

RemoteAddr

The remote address of this connection, typically generated from the URL.

Public variable

FString

 

RequestURL

Public variable

EResendAllDataS...

 

ResendAllDataState

This functionality is used during replay checkpoints for example, so we can re-use the existing connection and channels to record a version of each actor and capture all properties that have changed since the actor has been alive...

Public variable

int32

 

ResponseId

Public variable

FBitWriter

 

SendBuffer

Packet.

Public variable

FBitWriter

 

SendBunchHeader

The singleton buffer for sending bunch header information

Public variable

TArray< TObject...

 

SentTemporaries

This actor is bNetTemporary, which means it should never be replicated after it's initial packet is complete

Public variable

TWeakPtr< State...

 

StatelessConnectComponent

Reference to the PacketHandler component, for managing stateless connection handshakes

Public variable

float

 

StatPeriod

Interval between gathering stats

Public variable

double

 

StatUpdateTime

Stat display.

Public variable

int32

 

TickCount

Public variable

bool

 

TimeSensitive

Public variable

FURL

 

URL

Public variable

TObjectPtr< cla...

 

ViewTarget

The actor that is currently being viewed/controlled by the owning controller

Constructors

Name Description

Public function

UNetConnection

(
    const FObjectInitializer& ObjectIn...
)

Constructors and destructors.

Public function

UNetConnection

(
    FVTableHelper& Helper
)

Destructors

Name Description

Public function Virtual

~UNetConnection()

Destructor

Functions

Name Description

Public function Const

FActorChanne...

 

ActorChannelConstIterator()

Public function Const

const FActor...

 

ActorChannelMap()

Public function Const

int32

 

ActorChannelsNum()

Public function

void

 

AddActorChannel

(
    AActor* Actor,
    UActorChannel* Channel
)

Public function

void

 

AddDestructionInfo

(
    FActorDestructionInfo* Destruc...
)

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

AddReservedChannel

(
    int32 ChIndex
)

Public function Virtual

void

 

AssertValid()

Make sure this connection is in a reasonable state.

Public function Virtual

void

 

CleanUp()

Closes the control channel, cleans up structures, and prepares for deletion

Protected function

void

 

CleanupDormantActorState()

Public function

void

 

CleanupDormantReplicatorsForActor

(
    AActor* Actor
)

Remove the reference of all dormant object replicators owned by an actor

Public function

void

 

CleanupStaleDormantReplicators()

Removes dormant object replicators from objects now invalid.

Public function

void

 

ClearDormantFlushedObjectsForActor

(
    AActor* Actor
)

Clear stored flushed replicated sub-objects for a given actor, generally after replication or when the actor is destroyed

Protected function

void

 

ClearDormantReplicatorsReference()

Public function Virtual Const

bool

 

ClientHasInitializedLevelFor

(
    const AActor* TestActor
)

Returns whether the client has initialized the level required for the given object

Public function

void

 

Close

(
    FNetResult&& CloseReason
)

Closes the connection (including sending a close notify across the network)

Public function

void

 

Close

(
    FNetCloseResult&& CloseReason
)

Closes the connection (including sending a close notify across the network)

Public function

void

 

Close()

Closes the connection (including sending a close notify across the network) NOTE: To be deprecated in the near future.

Public function

void

 

ConsumePacketAnalytics

Returns the current packet stability analytics and resets them.

Public function

void

 

ConsumeQueuedActorDelinquencyAnalytics

Returns the current delinquency analytics and resets them.

Public function

void

 

ConsumeSaturationAnalytics

Returns the current saturation analytics and resets them.

Public function

bool

 

ContainsActorChannel

(
    const TWeakObjectPtr< AActor >& Ac...
)

Public function

UChannel ...

 

CreateChannelByName

(
    const FName& ChName,
    EChannelCreateFlags CreateFlags,
    int32 ChannelIndex
)

Create a channel.

Public function Virtual

TSharedPtr< ...

 

CreateReplicatorForNewActorChannel

(
    UObject* Object
)

Called by UActorChannel.

Public function Virtual

FString

 

Describe()

Describe the connection.

Protected function Virtual

void

 

DestroyIgnoredActor

(
    AActor* Actor
)

Called internally to destroy an actor during replay fast-forward when the actor channel index will be recycled

Protected function Virtual

void

 

DestroyOwningActor()

During cleanup this will destroy the actor owned by this connection (generally a PlayerController)

Public function Virtual

void

 

DispatchPacket

(
    FBitReader& Reader,
    int32 PacketId,
    bool& bOutSkipAck,
    bool& bOutHasBunchErrors
)

Disassemble and dispatch packet.

Public function

void

 

EnableEncryption

(
    const FEncryptionData& EncryptionD...
)

Sets the encryption data and enables encryption.

Public function

void

 

EnableEncryption()

Enables encryption for the underlying encryption packet handler component.

Public function

void

 

EnableEncryptionServer

(
    const FEncryptionData& EncryptionD...
)

Sets the encryption data, enables encryption, and sends the encryption ack to the client.

Public function

void

 

ExecuteOnAllDormantReplicators

Trigger a callback on all dormant replicators of every dormant actor we stored

Public function

void

 

ExecuteOnAllDormantReplicatorsOfActor

(
    AActor* OwnerActor,
    UE::Net::FExecuteForEachDormantRepl...
)

Trigger a callback on all dormant replicators owned by a dormant actor

Public function

UActorChanne...

 

FindActorChannel

(
    const TWeakObjectPtr< AActor >& Ac...
)

Public function

UActorChanne...

 

FindActorChannelRef

(
    const TWeakObjectPtr< AActor >& Ac...
)

Public function

TSharedPtr< ...

 

FindAndRemoveDormantReplicator

(
    AActor* OwnerActor,
    UObject* Object
)

Find a dormant replicator for the channel actor or one of its subobjects.

Public function Virtual

void

 

FlushDormancy

(
    AActor* Actor
)

Public function

void

 

FlushDormancyForObject

(
    AActor* DormantActor,
    UObject* ReplicatedObject
)

Validate an objects dormancy state and prepare the object for replication again

Public function Virtual

void

 

FlushNet

(
    bool bIgnoreSimulation
)

Flushes any pending data, bundling it into a packet and sending it via LowLevelSend() also handles network simulation settings (simulated lag, packet loss, etc) unless bIgnoreSimulation is true

Public function

void

 

FlushPacketOrderCache

(
    bool bFlushWholeCache
)

Flush the cache of sequenced packets waiting for a missing packet.

Public function

void

 

ForcePropertyCompare

(
    AActor* Actor
)

Forces properties on this actor to do a compare for one frame (rather than share shadow state)

Public function

TMap< FStrin...

 

GetActorsStarvedByClassTimeMap()

Returns the actor starvation map

Public function Virtual

int32

 

GetAddrPort()

Public function Const

bool

 

GetAutoFlush()

Public function Const

float

 

GetAverageJitterInMS()

Current jitter for this connection in milliseconds

Public function Const

const TSet< ...

 

GetClientMakingVisibleLevelNames()

Public function Const

FName

 

GetClientWorldPackageName()

Public function Const

uint32

 

GetConnectionId()

Public function Const

const EConne...

 

GetConnectionState()

Public function Const

double

 

GetConnectTime()

Public function

TSet< FNetwo...

 

GetDestroyedStartupOrDormantActorGUIDs()

Public function

UE::Net::FDo...

 

GetDormantFlushedObjectsForActor

(
    AActor* Actor
)

Retrieve stored set of replicated sub-objects of the given actor at the time of the last dormancy flush This data is cleared when the actor is processed by ReplicateActor

Public function Const

const UNetDr...

 

GetDriver()

Public function

UNetDriver &...

 

GetDriver()

Public function

UE::Net::FNe...

 

GetFaultRecovery()

Public function

int64

 

GetFreeSendBufferBits()

Returns number of bits left in current packet that can be used without causing a flush.

Public function Const

const FNetCo...

 

GetInLossPercentage()

Public function Const

int32

 

GetInTotalHandlerPackets()

Public function Const

FNetTraceCol...

 

GetInTraceCollector()

Protected function Const

int32

 

GetLastNotifiedPacketId()

Return last notified packet id

Public function Const

double

 

GetLastRecvAckTime()

Public function Const

int32

 

GetMaxSingleBunchSizeBits()

The maximum number of bits allowed within a single bunch.

Public function Const

FHistogram

 

GetNetHistogram()

Public function

UE::Net::FNe...

 

GetNetPing()

Public function Const

uint32

 

GetNetworkCustomVersion

(
    const FGuid& VersionGuid
)

Public function Const

int32

 

GetNumTickingChannels()

Public function

TArray< FOut...

 

GetOutgoingBunches()

Returns the OutgoingBunches array, only to be used by UChannel::SendBunch

Public function Const

const FNetCo...

 

GetOutLossPercentage()

Public function Const

uint32

 

GetOutTotalNotifiedPackets()

Get the current number of sent packets for which we have received a delivery notification

Public function Const

FNetTraceCol...

 

GetOutTraceCollector()

Public function Const

const FNetCo...

 

GetPacketAnalytics()

Returns the current packet stability analytics.

Public function Const

uint32

 

GetParentConnectionId()

If this is a child connection it will return the topmost parent coonnection ID, otherwise it will return its own ID.

Public function Const

bool

 

GetPendingCloseDueToReplicationFailure()

Protected function Const

bool

 

GetPendingCloseDueToSocketSendFailure()

Public function Const

FName

 

GetPlayerOnlinePlatformName()

Returns the online platform name for the player on this connection.

Public function Const

const FNetQu...

 

GetQueuedActorDelinquencyAnalytics()

Returns the current delinquency analytics.

Public function Virtual

TSharedPtr< ...

 

GetRemoteAddr()

Return the platform specific FInternetAddr type, containing this connections address.

Public function Const

AActor *

 

GetRepContextActor()

Public function Const

ULevel *

 

GetRepContextLevel()

Public function

UReplication...

 

GetReplicationConnectionDriver()

Public function

FRPCDoSDetec...

 

GetRPCDoS()

Public function Const

const FNetCo...

 

GetSaturationAnalytics()

Returns the current saturation analytics.

Public function Virtual

float

 

GetTimeoutValue()

Return current timeout value that should be used

Public function Const

int32

 

GetTotalOutOfOrderPackets()

Get the total number of out of order packets on this connection.

Public function Const

int32

 

GetTotalOutOfOrderPacketsDuplicate()

Get the total number of out of order packets that were duplicates on this connection.

Public function Const

int32

 

GetTotalOutOfOrderPacketsLost()

Get the total number of out of order packets lost on this connection.

Public function Const

int32

 

GetTotalOutOfOrderPacketsRecovered()

Get the total number of out of order packets recovered on this connection.

Public function Virtual

UChildConnec...

 

GetUChildConnection()

Get the representation of a secondary splitscreen connection that reroutes calls to the parent connection

Public function

UVoiceChanne...

 

GetVoiceChannel()

Public function Virtual Const

UWorld *

 

GetWorld()

Get the world the connection belongs to

Public function Virtual

void

 

HandleClientPlayer

(
    APlayerController* PC,
    UNetConnection* NetConnection
)

Handle the player controller client

Protected function Virtual

void

 

HandleConnectionTimeout

(
    const FString& Error
)

This is called whenever a connection has passed the relative time to be considered timed out.

Public function

void

 

HandleReceiveCloseReason

(
    const FString& CloseReasonList
)

Handles parsing/validation and logging of NMT_CloseReason messages

Public function

void

 

HandleReceiveNetUpgrade

(
    uint32 RemoteNetworkVersion,
    EEngineNetworkRuntimeFeatures Remot...,
    UE::Net::ENetUpgradeSource NetUpgra...
)

Handles receiving NMT_Upgrade messages (including at stateless handshake level)

Public function

bool

 

HasReceivedClientPacket()

Whether or not a client packet has been received - used serverside, to delay any packet sends

Public function Virtual

void

 

InitBase

(
    UNetDriver* InDriver,
    FSocket* InSocket,
    const FURL& InURL,
    EConnectionState InState,
    int32 InMaxPacket,
    int32 InPacketOverhead
)

Initialize common settings for this connection instance

Protected function

void

 

InitChannelData()

Public function Virtual

void

 

InitConnection

(
    UNetDriver* InDriver,
    EConnectionState InState,
    const FURL& InURL,
    int32 InConnectionSpeed,
    int32 InMaxPacket
)

Initializes an "addressless" connection with the passed in settings

Public function Virtual

void

 

InitHandler()

Initializes the PacketHandler

Public function Virtual

void

 

InitLocalConnection

(
    UNetDriver* InDriver,
    FSocket* InSocket,
    const FURL& InURL,
    EConnectionState InState,
    int32 InMaxPacket,
    int32 InPacketOverhead
)

Initialize this connection instance to a remote source

Public function Virtual

void

 

InitRemoteConnection

(
    UNetDriver* InDriver,
    FSocket* InSocket,
    const FURL& InURL,
    const FInternetAddr& InRemoteAddr,
    EConnectionState InState,
    int32 InMaxPacket,
    int32 InPacketOverhead
)

Initialize this connection instance from a remote source

Public function Virtual

void

 

InitSendBuffer()

Resets the FBitWriter to its default state

Public function Virtual

void

 

InitSequence

(
    int32 IncomingSequence,
    int32 OutgoingSequence
)

Initializes the sequence numbers for the connection, usually from shared randomized data

Public function

bool

 

IsClientMsgTypeValid

(
    const uint8 ClientMsgType
)

This function validates that ClientMsgType is the next expected msg type.

Public function Virtual Const

bool

 

IsEncryptionEnabled()

Returns true if encryption is enabled for this connection.

Public function Const

bool

 

IsForceInitialDirty()

Public function Const

bool

 

IsInternalAck()

Public function Virtual

int32

 

IsNetReady

(
    bool Saturate
)

Return whether this channel is ready for sending.

Public function Const

bool

 

IsReplay()

Public function Virtual Const

bool

 

IsReplayReady()

Public function Const

bool

 

IsReservingDestroyedChannels()

Public function Const

bool

 

IsUnlimitedBunchSizeAllowed()

Used to allow connections to ignore the bunch size limitation applied before splitting into partial bunch packets, or when receiving partial bunches to reassemble.

Public function Virtual

FString

 

LowLevelDescribe()

Public function Virtual

FString

 

LowLevelGetRemoteAddress

(
    bool bAppendPort
)

Public function Virtual

void

 

LowLevelSend

(
    void* Data,
    int32 CountBits,
    FOutPacketTraits& Traits
)

Sends a byte stream to the remote endpoint using the underlying socket

Public function Virtual

void

 

NotifyActorChannelCleanedUp

(
    UActorChannel* Channel,
    EChannelCloseReason CloseReason
)

Public function Virtual

void

 

NotifyActorDestroyed

(
    AActor* Actor,
    bool IsSeamlessTravel
)

Called when owning network driver receives NotifyActorDestroyed.

Public function Virtual

void

 

NotifyActorNetGUID

(
    UActorChannel* Channel
)

Called when an actor channel is open and knows its NetGUID.

Public function Virtual

void

 

NotifyAnalyticsProvider()

Notification that the NetDriver analytics provider has been updated NOTE: Can also mean disabled, e.g. during hotfix

Protected function

void

 

NotifyConnectionUpdated()

Notification that information about this connection may have been updated

Public function

void

 

PopLastStart()

Pops the LastStart bits off of the send buffer, used for merging bunches

Public function

void

 

PostTickDispatch()

Called after Driver.TickDispatch has processed received packets

Public function

void

 

PreTickDispatch()

Called before Driver.TickDispatch processes received packets

Public function

void

 

ReadInput

(
    float DeltaSeconds
)

Read input

Public function

void

 

ReceivedNak

(
    int32 NakPacketId
)

Packet was negatively acknowledged.

Public function Virtual

void

 

ReceivedPacket

(
    FBitReader& Reader,
    bool bIsReinjectedPacket,
    bool bDispatchPacket
)

Handle a packet we just received.

Public function Virtual

void

 

ReceivedRawPacket

(
    void* Data,
    int32 Count
)

Allows the connection to process the raw data that was received

Public function Virtual

FString

 

RemoteAddressToString()

Gets a unique ID for the connection, this ID depends on the underlying connection For IP connections this is an IP Address and port, for steam this is a SteamID

Public function

void

 

RemoveActorChannel

(
    AActor* Actor
)

Actor Channel Accessors

Public function

void

 

RemoveDestructionInfo

(
    FActorDestructionInfo* Destruc...
)

Public function

void

 

RemoveDormantReplicator

(
    AActor* Actor,
    UObject* Object
)

Remove any reference to the dormant object replicator

Public function

void

 

ResetActorsStarvedByClassTimeMap()

Clears the actor starvation map

Public function

void

 

ResetDestructionInfos()

Public function

void

 

ResetGameWorldState()

Clear all Game specific state. Called during seamless travel

Public function

void

 

ResetPacketAnalytics()

Resets the current packet stability analytics.

Public function

void

 

ResetPacketBitCounts()

Sets all of the bit-tracking variables to zero.

Public function

void

 

ResetQueuedActorDelinquencyAnalytics()

Resets the current delinquency analytics.

Public function

void

 

ResetSaturationAnalytics()

Resets the current saturation analytics.

Public function

void

 

SendChallengeControlMessage()

Sends the NMT_Challenge message

Public function

void

 

SendChallengeControlMessage

(
    const FEncryptionKeyResponse& Resp...
)

Sends the NMT_Challenge message based on encryption response

Public function

void

 

SendClientEncryptionAck()

Sends an NMT_EncryptionAck message

Public function

void

 

SendCloseReason

(
    FNetCloseResult&& CloseReason
)

Sends an NMT_CloseReason message, with the specified close reason or close reason chain.

Public function

void

 

SendCloseReason

(
    FNetResult&& CloseReason
)

Sends an NMT_CloseReason message, with the specified close reason or close reason chain.

Public function

int32

 

SendRawBunch

(
    FOutBunch& Bunch,
    bool InAllowMerge,
    const FNetTraceCollector* Bunc...
)

Send a raw bunch

Public function

int32

 

SendRawBunch

(
    FOutBunch& Bunch,
    bool InAllowMerge
)

Public function

void

 

SetAllowExistingChannelIndex

(
    bool bAllow
)

Sets whether we handle opening channels with an index that already exists, used by replays to fast forward the packet stream

Public function

void

 

SetAutoFlush

(
    bool bValue
)

Public function Virtual

void

 

SetClientLoginState

(
    const EClientLoginState::Type NewSt...
)

Wrapper for setting the current client login state, so we can trap for debugging, and verbosity purposes.

Public function

void

 

SetClientWorldPackageName

(
    FName NewClientWorldPackageName
)

Public function

void

 

SetConnectionId

(
    uint32 InConnectionId
)

Public function

void

 

SetConnectionState

(
    EConnectionState ConnectionState
)

Public function

void

 

SetEncryptionData

(
    const FEncryptionData& EncryptionD...
)

Sets the data for the underlying encryption packet handler component, but doesn't modify encryption enabled state.

Public function

void

 

SetEngineVersion

(
    const FEngineVersion& InEngineVers...
)

Sets engine version information for compatibility purposes

Public function

void

 

SetExpectedClientLoginMsgType

(
    const uint8 NewType
)

Wrapper for setting the current expected client login msg type.

Public function

void

 

SetForceInitialDirty

(
    bool bValue
)

Public function

void

 

SetIgnoreActorBunches

(
    bool bInIgnoreActorBunches,
    TSet< FNetworkGUID >&& InIgnoredBu...
)

Sets whether or not we should ignore bunches for a specific set of NetGUIDs.

Public function

void

 

SetIgnoreReservedChannels

(
    bool bInIgnoreReservedChannels
)

Sets whether or not GetFreeChannelIndex should ignore reserved channels Should only be used with InternalAck.

Public function

void

 

SetInternalAck

(
    bool bValue
)

Public function Const

void

 

SetNetVersionsOnArchive

(
    FArchive& Ar
)

Set version information on an archive that can be used for compatibility checks

Public function

void

 

SetNetworkCustomVersions

(
    const FCustomVersionContainer& Cus...
)

Public function

void

 

SetPackageVersionLicenseeUE

(
    int32 InPackageVersionLicenseeUE
)

Sets the licensee package version for compatibility purposes

Public function

void

 

SetPackageVersionUE

(
    FPackageFileVersion InPackageVersio...
)

Sets the UE package version for compatibility purposes

Public function

void

 

SetPacketOSReceiveTime

(
    const FPacketTimestamp& InOSReceiv...,
    bool bInIsOSReceiveTimeLocal
)

Sets the OS/NIC level timestamp, for the last packet that was received

Public function

void

 

SetPendingCloseDueToReplicationFailure()

Protected function

void

 

SetPendingCloseDueToSocketSendFailure()

Public function

void

 

SetPlayerOnlinePlatformName

(
    const FName InPlayerOnlinePlatformN...
)

Sets the PlayerOnlinePlatformName member.

Public function

void

 

SetReplay

(
    bool bValue
)

Public function

void

 

SetReplicationConnectionDriver

Public function

void

 

SetReserveDestroyedChannels

(
    bool bInReserveChannels
)

Sets whether or not we should track released channel indices, see also SetIgnoreReservedChannels Should only be used with InternalAck.

Public function

void

 

SetUnlimitedBunchSizeAllowed

(
    bool bValue
)

Public function

bool

 

ShouldReplicateVoicePacketFrom

(
    const FUniqueNetId& Sender
)

Called to determine if a voice packet should be replicated to this connection or any of its child connections

Public function

void

 

SlowAssertValid()

Make sure this connection is in a reasonable state.

Public function

void

 

StartTickingChannel

(
    UChannel* Channel
)

Adds the channel to the ticking channels list.

Public function

void

 

StopTickingChannel

(
    UChannel* Channel
)

Removes a channel from the ticking list directly

Public function

void

 

StoreDormantReplicator

(
    AActor* OwnerActor,
    UObject* Object,
    const TSharedRef< FObjectReplicator...
)

Store a replicator to the dormancy map and release its strong pointer to its object

Public function

void

 

TearDownReplicationConnectionDriver()

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Poll the connection. If it is timed out, close it.

Public function

bool

 

TrackLogsPerSecond()

This function tracks the number of log calls per second for this client, and disconnects the client if it detects too many calls are made per second

Public function

void

 

TrackReplicationForAnalytics

(
    const bool bWasSaturated
)

Called to notify the connection that we attempted to replicate its actors this frame.

Public function

FNetLevelVis...

 

UpdateLevelStreamStatusChangedTransactionId

(
    const ULevelStreaming* LevelOb...,
    const FName PackageName,
    bool bShouldBeVisible
)

Update FNetLevelVisibilityTransactionId for server instigated level streaming

Public function

void

 

UpdateLevelVisibility

(
    const FUpdateLevelVisibilityLevelIn...
)

Called by PlayerController to tell connection about client level visibility change

Public function

void

 

UpdatePacketSimulationSettings()

Copies the settings from the net driver to our local copy

Public function Virtual

void

 

ValidateSendBuffer()

Validates the FBitWriter to make sure it's not in an error state

Public function

int32

 

WriteBitsToSendBuffer

(
    const uint8* Bits,
    const int32 SizeInBits,
    const uint8* ExtraBits,
    const int32 ExtraSizeInBits,
    EWriteBitsDataType DataType
)

Appends the passed in data to the SendBuffer to be sent when FlushNet is called

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Enums

Name

Description

Public enum

EWriteBitsDataType

What type of data is being written

Typedefs

Name

Description

FNetCloseResult

FNetConnectionPacketLoss

Percentage of packets lost during the last StatPeriod

FNetResult

Constants

Name

Description

DEFAULT_MAX_CHANNEL_SIZE

GNetConnectionBeingCleanedUp

: set to net connection currently inside CleanUp(), for HasClientLoadedCurrentWorld() to be able to find it during PlayerController destruction, since we clear its Player before destroying it.

Deprecated Variables

Name Description

Public variable

TMap< FObjectKe...

 

DormantReplicatorMap

The DormantReplicatorMap is deprecated in favor of the private DormantReplicatorSet.

Public variable

uint32

 

EngineNetworkProtocolVersion

Deprecated in favor of NetworkCustomVersions, please use GetNetworkCustomVersion instead

Public variable

uint32

 

GameNetworkProtocolVersion

Deprecated in favor of NetworkCustomVersions, please use GetNetworkCustomVersion instead

Public variable

int32

 

MaxChannelSize

No longer used

Deprecated Functions

Name Description

Public function

void

 

AddDormantReplicator

(
    UObject* Object,
    const TSharedRef< FObjectReplicator...
)

AddDormantReplicator has been replaced by StoreDormantReplicator and will be removed soon.

Public function

TSharedPtr< ...

 

FindAndRemoveDormantReplicator

(
    UObject* Object
)

FindAndRemoveDormantReplicator is deprecated. Use the new version that needs to receive the owning actor.

Public function

void

 

FlushDormancyForObject

(
    UObject* Object
)

FlushDormancyForObject has been replaced with a version that needs to receive the dormant actor.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel