Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/NetConnection.h |
Include |
#include "Engine/NetConnection.h" |
class UNetConnection : public UPlayer
Name | Description | ||
---|---|---|---|
|
AllowMerge |
||
|
AnalyticsVars |
Net Analytics The locally cached/updated analytics variables, for the NetConnection - aggregated upon connection Close |
|
|
double |
AverageFrameTime |
The average frame delta time over the last 1 second period. |
|
float |
AvgLag |
Average lag seen during the last StatPeriod |
|
bLastHasServerFrameTime |
||
|
bNeedsByteSwapping |
Whether this channel needs to byte swap all data or not |
|
|
uint32: 1 |
bPendingDestroy |
|
|
Challenge |
||
|
Channels |
||
|
Children |
Child connections for secondary viewports |
|
|
ClientLoginState |
Login state tracking. |
|
|
ClientResponse |
||
|
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 |
|
|
CountedFrames |
Nb of stats accumulated in CumulativeTime |
|
|
double |
CumulativeTime |
Total frames times accumulator |
|
DormantReplicatorMap |
A list of replicators that belong to recently dormant actors/objects |
|
|
TObjectPtr< cla... |
Driver |
Owning net driver |
|
EngineNetworkProtocolVersion |
Network version. |
|
|
ExpectedClientLoginMsgType |
||
|
double |
FrameTime |
|
|
GameNetworkProtocolVersion |
||
|
TUniquePtr< Pac... |
Handler |
PacketHandler, for managing layered handler components, which modify packets as they are sent/received |
|
InBytes |
Bytes sent/received on this connection (accumulated during a StatPeriod) |
|
|
InBytesPerSecond |
Bytes sent/received on this connection (per second) - these are from previous StatPeriod interval |
|
|
InitInReliable |
||
|
InitOutReliable |
||
|
InPacketId |
||
|
InPackets |
Packets sent/received on this connection (accumulated during a StatPeriod) |
|
|
InPacketsLost |
Packets lost on this connection (accumulated during a StatPeriod) |
|
|
InPacketsPerSecond |
Packets sent/received on this connection (per second) - these are from previous StatPeriod interval |
|
|
InReliable |
||
|
InTotalBytes |
Total bytes sent/received on this connection |
|
|
InTotalPackets |
Total packets sent/received on this connection |
|
|
InTotalPacketsLost |
Total packets lost on this connection |
|
|
KeepProcessingActorChannelBunchesMap |
This holds a list of actor channels that want to fully shutdown, but need to continue processing bunches before doing so |
|
|
double |
LagAcc |
Total accumulated lag values during the current StatPeriod |
|
LagCount |
Nb of stats accumulated in LagAcc |
|
|
LastEnd |
||
|
double |
LastGoodPacketRealtime |
|
|
LastOut |
||
|
LastOutBunch |
||
|
LastProcessedFrame |
||
|
double |
LastReceiveRealtime |
|
|
double |
LastReceiveTime |
Internal. |
|
double |
LastSendTime |
|
|
LastStart |
Merge info. |
|
|
double |
LastTickTime |
|
|
double |
LastTime |
Monitors frame time |
|
LogCallCount |
||
|
double |
LogCallLastTime |
Log tracking. |
|
LogSustainedCount |
||
|
LowLevelSendDel |
Delegate for hooking LowLevelSend |
|
|
MaxChannelSize |
||
|
MaxPacket |
||
|
MaxPacketHandlerBits |
The maximum number of bits all packet handlers will reserve |
|
|
NetAnalyticsData |
The net analytics data holder for the NetConnection analytics, which is where analytics variables are aggregated upon Close |
|
|
NetworkCongestionControl |
||
|
int |
NumAckBits |
Number of bits used for acks in the current packet. |
|
int |
NumBunchBits |
Number of bits used for bunches in the current packet. |
|
int |
NumPacketIdBits |
Number of bits used for the packet id in the current packet. |
|
int |
NumPaddingBits |
Number of bits used for padding in the current packet. |
|
OpenChannels |
||
|
OutAckPacketId |
||
|
OutBytes |
||
|
OutBytesPerSecond |
||
|
uint8[256] |
OutBytesPerSecondHistory |
|
|
int32[256] |
OutLagPacketId |
|
|
double[256] |
OutLagTime |
|
|
OutPacketId |
||
|
OutPackets |
||
|
OutPacketsLost |
||
|
OutPacketsPerSecond |
||
|
OutReliable |
||
|
OutTotalAcks |
Total acks sent on this connection |
|
|
OutTotalBytes |
||
|
OutTotalPackets |
||
|
OutTotalPacketsLost |
||
|
TObjectPtr< cla... |
OwningActor |
Reference to controlling actor (usually PlayerController) |
|
TObjectPtr< cla... |
PackageMap |
Package map between local and remote. (negotiates net serialization) |
|
TSubclassOf< UP... |
PackageMapClass |
The class name for the PackageMap to be loaded |
|
PacketOverhead |
Negotiated parameters. |
|
|
PacketSimulationSettings |
Packet settings for testing lag, net errors, etc |
|
|
PendingOutRec |
||
|
PlayerId |
Net id of remote player on this connection. Only valid on client connections (server side). |
|
|
QueuedBits |
||
|
ReceivedRawPacketDel |
Delegate for hooking ReceivedRawPacket |
|
|
TSharedPtr< FIn... |
RemoteAddr |
The remote address of this connection, typically generated from the URL. |
|
RequestURL |
||
|
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... |
|
|
ResponseId |
||
|
SendBuffer |
Packet. |
|
|
SendBunchHeader |
The singleton buffer for sending bunch header information |
|
|
SentTemporaries |
This actor is bNetTemporary, which means it should never be replicated after it's initial packet is complete |
|
|
StatelessConnectComponent |
Reference to the PacketHandler component, for managing stateless connection handshakes |
|
|
float |
StatPeriod |
Interval between gathering stats |
|
double |
StatUpdateTime |
Stat display. |
|
TickCount |
||
|
TimeSensitive |
||
|
URL |
||
|
TObjectPtr< cla... |
ViewTarget |
The actor that is currently being viewed/controlled by the owning controller |
Name | Description | |
---|---|---|
|
UNetConnection ( |
Constructors and destructors. |
Name | Description | |
---|---|---|
|
~UNetConnection() |
Destructor |
Name | Description | ||
---|---|---|---|
|
FActorChanne... |
ActorChannelConstIterator() |
|
|
const FActor... |
ActorChannelMap() |
|
|
ActorChannelsNum() |
||
|
AddActorChannel ( |
||
|
AddDestructionInfo ( |
||
|
AddReferencedObjects ( |
||
|
AddReservedChannel ( |
||
|
AssertValid() |
Make sure this connection is in a reasonable state. |
|
|
CleanUp() |
Closes the control channel, cleans up structures, and prepares for deletion |
|
|
CleanupDormantActorState() |
||
|
CleanupDormantReplicatorsForActor ( |
Removes Actor and its replicated components from DormantReplicatorMap. |
|
|
CleanupStaleDormantReplicators() |
Removes stale entries from DormantReplicatorMap. |
|
|
ClientHasInitializedLevelFor ( |
Returns whether the client has initialized the level required for the given object |
|
|
Close ( |
Closes the connection (including sending a close notify across the network) |
|
|
Close ( |
Closes the connection (including sending a close notify across the network) |
|
|
Close() |
Closes the connection (including sending a close notify across the network) |
|
|
ConsumePacketAnalytics ( |
Returns the current packet stability analytics and resets them. |
|
|
ConsumeQueuedActorDelinquencyAnalytics |
Returns the current delinquency analytics and resets them. |
|
|
ConsumeSaturationAnalytics |
Returns the current saturation analytics and resets them. |
|
|
ContainsActorChannel ( |
||
|
UChannel ... |
CreateChannelByName ( |
Create a channel. |
|
TSharedPtr< ... |
CreateReplicatorForNewActorChannel ( |
Called by UActorChannel. |
|
Describe() |
Describe the connection. |
|
|
DestroyIgnoredActor ( |
Called internally to destroy an actor during replay fast-forward when the actor channel index will be recycled |
|
|
DestroyOwningActor() |
During cleanup this will destroy the actor owned by this connection (generally a PlayerController) |
|
|
EnableEncryption ( |
Sets the encryption data and enables encryption. |
|
|
EnableEncryption() |
Enables encryption for the underlying encryption packet handler component. |
|
|
EnableEncryptionServer ( |
Sets the encryption data, enables encryption, and sends the encryption ack to the client. |
|
|
UActorChanne... |
FindActorChannel ( |
|
|
UActorChanne... |
FindActorChannelRef ( |
|
|
FlushDormancy ( |
||
|
FlushDormancyForObject ( |
Wrapper for validating an objects dormancy state, and to prepare the object for replication again |
|
|
FlushNet ( |
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 |
|
|
FlushPacketOrderCache ( |
Flush the cache of sequenced packets waiting for a missing packet. |
|
|
ForcePropertyCompare ( |
Forces properties on this actor to do a compare for one frame (rather than share shadow state) |
|
|
GetActorsStarvedByClassTimeMap() |
Returns the actor starvation map |
|
|
GetAddrPort() |
||
|
GetAutoFlush() |
||
|
float |
GetAverageJitterInMS() |
Current jitter for this connection in milliseconds |
|
GetClientWorldPackageName() |
||
|
GetConnectionId() |
||
|
const EConne... |
GetConnectionState() |
|
|
double |
GetConnectTime() |
|
|
GetDestroyedStartupOrDormantActorGUIDs() |
||
|
const UNetDr... |
GetDriver() |
|
|
UNetDriver &... |
GetDriver() |
|
|
UE::Net::FNe... |
GetFaultRecovery() |
|
|
GetFreeSendBufferBits() |
Returns number of bits left in current packet that can be used without causing a flush. |
|
|
const FNetCo... |
GetInLossPercentage() |
|
|
GetInTotalHandlerPackets() |
||
|
FNetTraceCol... |
GetInTraceCollector() |
|
|
double |
GetLastRecvAckTime() |
|
|
GetMaxSingleBunchSizeBits() |
The maximum number of bits allowed within a single bunch. |
|
|
GetNetHistogram() |
||
|
GetOutgoingBunches() |
Returns the OutgoingBunches array, only to be used by UChannel::SendBunch |
|
|
const FNetCo... |
GetOutLossPercentage() |
|
|
GetOutTotalNotifiedPackets() |
Get the current number of sent packets for which we have received a delivery notification |
|
|
FNetTraceCol... |
GetOutTraceCollector() |
|
|
const FNetCo... |
GetPacketAnalytics() |
Returns the current packet stability analytics. |
|
GetParentConnectionId() |
If this is a child connection it will return the topmost parent coonnection ID, otherwise it will return its own ID. |
|
|
GetPendingCloseDueToReplicationFailure() |
||
|
GetPendingCloseDueToSocketSendFailure() |
||
|
GetPlayerOnlinePlatformName() |
Returns the online platform name for the player on this connection. |
|
|
const FNetQu... |
GetQueuedActorDelinquencyAnalytics() |
Returns the current delinquency analytics. |
|
TSharedPtr< ... |
GetRemoteAddr() |
Return the platform specific FInternetAddr type, containing this connections address. |
|
AActor * |
GetRepContextActor() |
|
|
ULevel * |
GetRepContextLevel() |
|
|
UReplication... |
GetReplicationConnectionDriver() |
|
|
FRPCDoSDetec... |
GetRPCDoS() |
|
|
const FNetCo... |
GetSaturationAnalytics() |
Returns the current saturation analytics. |
|
float |
GetTimeoutValue() |
Return current timeout value that should be used |
|
GetTotalOutOfOrderPackets() |
Get the total number of out of order packets on this connection. |
|
|
GetTotalOutOfOrderPacketsDuplicate() |
Get the total number of out of order packets that were duplicates on this connection. |
|
|
GetTotalOutOfOrderPacketsLost() |
Get the total number of out of order packets lost on this connection. |
|
|
GetTotalOutOfOrderPacketsRecovered() |
Get the total number of out of order packets recovered on this connection. |
|
|
UChildConnec... |
GetUChildConnection() |
Get the representation of a secondary splitscreen connection that reroutes calls to the parent connection |
|
UVoiceChanne... |
GetVoiceChannel() |
|
|
UWorld * |
GetWorld() |
Get the world the connection belongs to |
|
HandleClientPlayer ( |
Handle the player controller client |
|
|
HandleConnectionTimeout ( |
This is called whenever a connection has passed the relative time to be considered timed out. |
|
|
HandleReceiveCloseReason ( |
Handles parsing/validation and logging of NMT_CloseReason messages |
|
|
HasReceivedClientPacket() |
Whether or not a client packet has been received - used serverside, to delay any packet sends |
|
|
InitBase ( |
Initialize common settings for this connection instance |
|
|
InitConnection ( |
Initializes an "addressless" connection with the passed in settings |
|
|
InitHandler() |
Initializes the PacketHandler |
|
|
InitLocalConnection ( |
Initialize this connection instance to a remote source |
|
|
InitRemoteConnection ( |
Initialize this connection instance from a remote source |
|
|
InitSendBuffer() |
Resets the FBitWriter to its default state |
|
|
InitSequence |
Initializes the sequence numbers for the connection, usually from shared randomized data |
|
|
IsClientMsgTypeValid ( |
This function validates that ClientMsgType is the next expected msg type. |
|
|
IsEncryptionEnabled() |
Returns true if encryption is enabled for this connection. |
|
|
IsForceInitialDirty() |
||
|
IsInternalAck() |
||
|
IsNetReady ( |
Return whether this channel is ready for sending. |
|
|
IsReplay() |
||
|
IsReplayReady() |
||
|
IsReservingDestroyedChannels() |
||
|
LowLevelDescribe() |
||
|
LowLevelGetRemoteAddress ( |
||
|
LowLevelSend ( |
Sends a byte stream to the remote endpoint using the underlying socket |
|
|
NotifyActorChannelCleanedUp ( |
||
|
NotifyActorDestroyed |
Called when owning network driver receives NotifyActorDestroyed. |
|
|
NotifyActorNetGUID ( |
Called when an actor channel is open and knows its NetGUID. |
|
|
NotifyAnalyticsProvider() |
Notification that the NetDriver analytics provider has been updated |
|
|
NotifyConnectionUpdated() |
Notification that information about this connection may have been updated |
|
|
PopLastStart() |
Pops the LastStart bits off of the send buffer, used for merging bunches |
|
|
PostTickDispatch() |
Called after Driver.TickDispatch has processed received packets |
|
|
PreTickDispatch() |
Called before Driver.TickDispatch processes received packets |
|
|
ReadInput ( |
Read input |
|
|
ReceivedNak ( |
Packet was negatively acknowledged. |
|
|
ReceivedPacket ( |
Handle a packet we just received. |
|
|
ReceivedRawPacket |
Allows the connection to process the raw data that was received |
|
|
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 |
|
|
RemoveActorChannel ( |
Actor Channel Accessors |
|
|
RemoveDestructionInfo ( |
||
|
ResetActorsStarvedByClassTimeMap() |
Clears the actor starvation map |
|
|
ResetDestructionInfos() |
||
|
ResetGameWorldState() |
Clear all Game specific state. Called during seamless travel |
|
|
ResetPacketAnalytics() |
Resets the current packet stability analytics. |
|
|
ResetPacketBitCounts() |
Sets all of the bit-tracking variables to zero. |
|
|
ResetQueuedActorDelinquencyAnalytics() |
Resets the current delinquency analytics. |
|
|
ResetSaturationAnalytics() |
Resets the current saturation analytics. |
|
|
SendChallengeControlMessage() |
Sends the NMT_Challenge message |
|
|
SendChallengeControlMessage ( |
Sends the NMT_Challenge message based on encryption response |
|
|
SendClientEncryptionAck() |
Sends an NMT_EncryptionAck message |
|
|
SendRawBunch |
||
|
SendRawBunch |
Send a raw bunch |
|
|
SetAllowExistingChannelIndex ( |
Sets whether we handle opening channels with an index that already exists, used by replays to fast forward the packet stream |
|
|
SetAutoFlush ( |
||
|
SetClientLoginState ( |
Wrapper for setting the current client login state, so we can trap for debugging, and verbosity purposes. |
|
|
SetClientWorldPackageName ( |
||
|
SetConnectionId ( |
||
|
SetConnectionState ( |
||
|
SetEncryptionData ( |
Sets the data for the underlying encryption packet handler component, but doesn't modify encryption enabled state. |
|
|
SetExpectedClientLoginMsgType ( |
Wrapper for setting the current expected client login msg type. |
|
|
SetForceInitialDirty ( |
||
|
SetIgnoreActorBunches ( |
Sets whether or not we should ignore bunches for a specific set of NetGUIDs. |
|
|
SetIgnoreReservedChannels ( |
Sets whether or not GetFreeChannelIndex should ignore reserved channels Should only be used with InternalAck. |
|
|
SetInternalAck ( |
||
|
SetPacketOSReceiveTime ( |
Sets the OS/NIC level timestamp, for the last packet that was received |
|
|
SetPendingCloseDueToReplicationFailure() |
||
|
SetPendingCloseDueToSocketSendFailure() |
||
|
SetPlayerOnlinePlatformName ( |
Sets the PlayerOnlinePlatformName member. |
|
|
SetReplay ( |
||
|
SetReplicationConnectionDriver ( |
||
|
SetReserveDestroyedChannels ( |
Sets whether or not we should track released channel indices, see also SetIgnoreReservedChannels Should only be used with InternalAck. |
|
|
ShouldReplicateVoicePacketFrom ( |
Called to determine if a voice packet should be replicated to this connection or any of its child connections |
|
|
SlowAssertValid() |
Make sure this connection is in a reasonable state. |
|
|
StartTickingChannel ( |
Adds the channel to the ticking channels list. |
|
|
StopTickingChannel ( |
Removes a channel from the ticking list directly |
|
|
TearDownReplicationConnectionDriver() |
||
|
Tick ( |
Poll the connection. If it is timed out, close it. |
|
|
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 |
|
|
TrackReplicationForAnalytics ( |
Called to notify the connection that we attempted to replicate its actors this frame. |
|
|
UpdateLevelVisibility ( |
Called by PlayerController to tell connection about client level visiblity change |
|
|
UpdatePacketSimulationSettings() |
Copies the settings from the net driver to our local copy |
|
|
ValidateSendBuffer() |
Validates the FBitWriter to make sure it's not in an error state |
|
|
WriteBitsToSendBuffer ( |
Appends the passed in data to the SendBuffer to be sent when FlushNet is called |
Name | Description | ||
---|---|---|---|
|
Exec ( |
Exec handler |
Name |
Description |
|
---|---|---|
|
EWriteBitsDataType |
What type of data is being written |
Name |
Description |
---|---|
FNetCloseResult |
|
FNetConnectionPacketLoss |
Percentage of packets lost during the last StatPeriod |
FNetResult |
Name |
Description |
---|---|
DEFAULT_MAX_CHANNEL_SIZE |
Channel table. |
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. |
Name | Description | ||
---|---|---|---|
|
float |
ConnectTime |
Please use GetConnectTime() instead. |
|
uint32: 1 |
InternalAck |
Please use IsInternalAck/SetInternalAck instead |
|
float |
LastRecvAckTime |
Please use GetLastRecvAckTime() instead. |
|
float |
RemoteSaturation |
RemoteSaturation is not calculated anymore and is now deprecated |
|
State |
EConnectionState State will be made private. Use GetConnectionState and SetConnectionState to access State instead. |
Name | Description | ||
---|---|---|---|
|
EnableEncryptionWithKey ( |
Use SetEncryptionData instead. |
|
|
EnableEncryptionWithKeyServer ( |
Use SetEncryptionData instead. |
|
|
SetEncryptionKey ( |
Use SetEncryptionData instead. |
|
|
SetIgnoreAlreadyOpenedChannels ( |
Please call SetAllowExistingChannelIndex instead. |
|
|
Tick() |
Now takes DeltaSeconds |