UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FNetDelegates Class Reference

#include <NetworkDelegates.h>

Public Member Functions

 DECLARE_DELEGATE_TwoParams (FReceivedNetworkEncryptionToken, const FString &, const FOnEncryptionKeyResponse &)
 
 DECLARE_DELEGATE_OneParam (FReceivedNetworkEncryptionAck, const FOnEncryptionKeyResponse &)
 
 DECLARE_DELEGATE_RetVal_OneParam (EEncryptionFailureAction, FReceivedNetworkEncryptionFailure, UNetConnection *)
 
 DECLARE_DELEGATE_FourParams (FNetworkCheatDetected, const class FUniqueNetId &, ECheatPunishType, const FString &, const FString &)
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnPendingNetGameConnectionCreated, UPendingNetGame *)
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnSyncLoadDetected, const FNetSyncLoadReport &)
 

Static Public Attributes

static ENGINE_API FReceivedNetworkEncryptionToken OnReceivedNetworkEncryptionToken
 
static ENGINE_API FReceivedNetworkEncryptionAck OnReceivedNetworkEncryptionAck
 
static ENGINE_API FReceivedNetworkEncryptionFailure OnReceivedNetworkEncryptionFailure
 
static ENGINE_API FNetworkCheatDetected OnNetworkCheatDetected
 
static ENGINE_API FOnPendingNetGameConnectionCreated OnPendingNetGameConnectionCreated
 
static ENGINE_API FOnSyncLoadDetected OnSyncLoadDetected
 

Member Function Documentation

◆ DECLARE_DELEGATE_FourParams()

FNetDelegates::DECLARE_DELEGATE_FourParams ( FNetworkCheatDetected  ,
const class FUniqueNetId ,
ECheatPunishType  ,
const FString &  ,
const FString &   
)

Delegate fires whenever a client cheater is detected in the networking code

Parameters
PlayerIdnet id of the cheating client
PunishTypetype of punishment to apply to a cheating client
ReasonStrwhy the client is being punished due to cheating
InfoStrextra info about the punishment to be applied (eg. ban received, etc)

◆ DECLARE_DELEGATE_OneParam()

FNetDelegates::DECLARE_DELEGATE_OneParam ( FReceivedNetworkEncryptionAck  ,
const FOnEncryptionKeyResponse  
)

Delegate fired when encryption has been setup and acknowledged by the host. The client should setup their connection to continue future communication via encryption

Binding to this delegate overrides UGameInstance's handling of encryption (

See also
ReceivedNetworkEncryptionAck)
Parameters
Delegatedelegate that MUST be fired after retrieving the encryption key in order to complete the connection handshake

◆ DECLARE_DELEGATE_RetVal_OneParam()

FNetDelegates::DECLARE_DELEGATE_RetVal_OneParam ( EEncryptionFailureAction  ,
FReceivedNetworkEncryptionFailure  ,
UNetConnection  
)

Delegate fired when encryption has failed for a specific connection (client OR server) - allowing gameplay code to override how this is handled (e.g. to accept connections without encryption in development environments, and reject them in shipping environments).

Binding to this delegate overrides UGameInstance's handling of encryption (

See also
ReceivedNetworkEncryptionFailure)
Parameters
ConnectionThe server or client NetConnection which failed encryption.
Returns
Returns how to handle the encryption failure.

◆ DECLARE_DELEGATE_TwoParams()

FNetDelegates::DECLARE_DELEGATE_TwoParams ( FReceivedNetworkEncryptionToken  ,
const FString &  ,
const FOnEncryptionKeyResponse  
)

Delegate fired when an encryption key is required by the network layer in order to proceed with a connection with a client requesting a connection

Binding to this delegate overrides UGameInstance's handling of encryption (

See also
ReceivedNetworkEncryptionToken)
Parameters
EncryptionTokentoken sent by the client that should be used to retrieve an encryption key
Delegatedelegate that MUST be fired after retrieving the encryption key in order to complete the connection handshake

◆ DECLARE_MULTICAST_DELEGATE_OneParam() [1/2]

FNetDelegates::DECLARE_MULTICAST_DELEGATE_OneParam ( FOnPendingNetGameConnectionCreated  ,
UPendingNetGame  
)

Delegate fired when a pending net game has created a UNetConnection to the server but hasn't sent the initial join message yet.

Parameters
PendingNetGamepointer to the PendingNetGame that is initializing its connection to a server.

◆ DECLARE_MULTICAST_DELEGATE_OneParam() [2/2]

FNetDelegates::DECLARE_MULTICAST_DELEGATE_OneParam ( FOnSyncLoadDetected  ,
const FNetSyncLoadReport  
)

Delegate fired when net.ReportSyncLoads is enabled and the replication system has determined which property or object caused the load. This is likely reported after the load itself, since the load can occur while parsing export bunches, but we don't know what property or object refers to the loaded object until the property itself is read.

Parameters
SyncLoadReportstruct containing information about a sync load that occurred.

Member Data Documentation

◆ OnNetworkCheatDetected

FNetDelegates::FNetworkCheatDetected FNetDelegates::OnNetworkCheatDetected
static

◆ OnPendingNetGameConnectionCreated

FNetDelegates::FOnPendingNetGameConnectionCreated FNetDelegates::OnPendingNetGameConnectionCreated
static

◆ OnReceivedNetworkEncryptionAck

FNetDelegates::FReceivedNetworkEncryptionAck FNetDelegates::OnReceivedNetworkEncryptionAck
static

◆ OnReceivedNetworkEncryptionFailure

FNetDelegates::FReceivedNetworkEncryptionFailure FNetDelegates::OnReceivedNetworkEncryptionFailure
static

◆ OnReceivedNetworkEncryptionToken

FNetDelegates::FReceivedNetworkEncryptionToken FNetDelegates::OnReceivedNetworkEncryptionToken
static

◆ OnSyncLoadDetected

FNetDelegates::FOnSyncLoadDetected FNetDelegates::OnSyncLoadDetected
static

The documentation for this class was generated from the following files: