UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetConnection.h File Reference

Go to the source code of this file.

Classes

struct  FChannelCloseInfo
 
struct  FWrittenChannelsRecord
 
struct  FWrittenChannelsRecord::FChannelRecordEntry
 
class  UNetConnection
 
struct  FScopedRepContext
 
struct  FNetConnectionSettings
 
struct  FScopedNetConnectionSettings
 
class  USimulatedClientNetConnection
 

Namespaces

namespace  UE
 
namespace  UE::Net
 
namespace  NetConnectionHelper
 
namespace  EClientLoginState
 

Macros

#define NETCONNECTION_HAS_SETENCRYPTIONKEY   1
 

Typedefs

typedef TMap< TWeakObjectPtr< AActor >, UActorChannel *, FDefaultSetAllocator, TWeakObjectPtrMapKeyFuncs< TWeakObjectPtr< AActor >, UActorChannel * > > FActorChannelMap
 
typedef TArray< FChannelCloseInfo, TInlineAllocator< 8 > > FChannelsToClose
 

Enumerations

enum  { RELIABLE_BUFFER = 512 }
 
enum  { MAX_PACKETID = FNetPacketNotify::SequenceNumberT::SeqNumberCount }
 
enum  { MAX_CHSEQUENCE = 1024 }
 
enum  { MAX_BUNCH_HEADER_BITS = 256 }
 
enum  { MAX_PACKET_RELIABLE_SEQUENCE_HEADER_BITS = 32 + FNetPacketNotify::SequenceHistoryT::MaxSizeInBits }
 
enum  { MAX_PACKET_INFO_HEADER_BITS = 1 + NetConnectionHelper::NumBitsForJitterClockTimeInHeader + 1 + 8 }
 
enum  { MAX_PACKET_HEADER_BITS = MAX_PACKET_RELIABLE_SEQUENCE_HEADER_BITS + MAX_PACKET_INFO_HEADER_BITS }
 
enum  { MAX_PACKET_TRAILER_BITS = 1 }
 
enum  EConnectionState {
  USOCK_Invalid = 0 , USOCK_Closed = 1 , USOCK_Pending = 2 , USOCK_Open = 3 ,
  USOCK_Closing = 4
}
 
enum class  UE::Net::ENetUpgradeSource : uint8 { UE::Net::ControlChannel , UE::Net::StatelessHandshake }
 
enum  EClientLoginState::Type {
  EClientLoginState::Invalid = 0 , EClientLoginState::LoggingIn = 1 , EClientLoginState::Welcomed = 2 , EClientLoginState::ReceivedJoin = 3 ,
  EClientLoginState::CleanedUp = 4
}
 
enum class  EResendAllDataState : uint8 { None , SinceOpen , SinceCheckpoint }
 

Functions

 LLM_DECLARE_TAG_API (NetConnection, ENGINE_API)
 
ENGINE_API bool NetConnectionHelper::HasDisabledBandwidthThrottling ()
 
ENGINE_API const TCHARLexToString (const EConnectionState Value)
 
const TCHAREClientLoginState::ToString (const EClientLoginState::Type EnumVal)
 
 DECLARE_DELEGATE_ThreeParams (FOnReceivedRawPacket, void *, int32, bool &)
 
 DECLARE_DELEGATE_ThreeParams (FOnLowLevelSend, void *, int32, bool &)
 

Variables

constexpr int32 NetConnectionHelper::NumBitsForJitterClockTimeInHeader = 10
 
ENGINE_API TAutoConsoleVariable< int32CVarNetEnableCongestionControl
 

Macro Definition Documentation

◆ NETCONNECTION_HAS_SETENCRYPTIONKEY

#define NETCONNECTION_HAS_SETENCRYPTIONKEY   1

Typedef Documentation

◆ FActorChannelMap

◆ FChannelsToClose

Enumeration Type Documentation

◆ anonymous enum

Enumerator
RELIABLE_BUFFER 

◆ anonymous enum

Enumerator
MAX_PACKETID 

◆ anonymous enum

Enumerator
MAX_CHSEQUENCE 

◆ anonymous enum

Enumerator
MAX_BUNCH_HEADER_BITS 

◆ anonymous enum

Enumerator
MAX_PACKET_RELIABLE_SEQUENCE_HEADER_BITS 

◆ anonymous enum

Enumerator
MAX_PACKET_INFO_HEADER_BITS 

◆ anonymous enum

Enumerator
MAX_PACKET_HEADER_BITS 

◆ anonymous enum

Enumerator
MAX_PACKET_TRAILER_BITS 

◆ EConnectionState

Enumerator
USOCK_Invalid 
USOCK_Closed 
USOCK_Pending 
USOCK_Open 
USOCK_Closing 

◆ EResendAllDataState

enum class EResendAllDataState : uint8
strong

Type of property data resend used by replay checkpoints

Enumerator
None 
SinceOpen 
SinceCheckpoint 

Function Documentation

◆ DECLARE_DELEGATE_ThreeParams() [1/2]

DECLARE_DELEGATE_ThreeParams ( FOnLowLevelSend  ,
void ,
int32  ,
bool  
)

Delegate for hooking the net connections 'LowLevelSend' (at the socket level, after PacketHandler parsing)

Parameters
DataThe data being sent
CountThe number of bytes being sent
bBlockSendWhether or not to block the send (defaults to false)

◆ DECLARE_DELEGATE_ThreeParams() [2/2]

DECLARE_DELEGATE_ThreeParams ( FOnReceivedRawPacket  ,
void ,
int32  ,
bool  
)

Delegate for hooking the net connections 'ReceivedRawPacket'

Parameters
DataThe data received
CountThe number of bytes received
bBlockReceiveWhether or not to block further processing of the packet (defaults to false)

◆ LexToString()

ENGINE_API const TCHAR * LexToString ( const EConnectionState  Value)

◆ LLM_DECLARE_TAG_API()

LLM_DECLARE_TAG_API ( NetConnection  ,
ENGINE_API   
)

Variable Documentation

◆ CVarNetEnableCongestionControl

ENGINE_API TAutoConsoleVariable<int32> CVarNetEnableCongestionControl
extern