UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetworkDelegates.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "UObject/Object.h"
10#include "UObject/CoreNet.h"
11
12class UPendingNetGame;
13class UNetDriver;
14
19{
20 enum Type
21 {
27 Ignore
28 };
29
31 inline const TCHAR* ToString(EAcceptConnection::Type EnumVal)
32 {
33 switch (EnumVal)
34 {
35 case Reject:
36 {
37 return TEXT("Reject");
38 }
39 case Accept:
40 {
41 return TEXT("Accept");
42 }
43 case Ignore:
44 {
45 return TEXT("Ignore");
46 }
47 }
48 return TEXT("");
49 }
50};
51
56{
57public:
64
70 virtual void NotifyAcceptedConnection(class UNetConnection* Connection) PURE_VIRTUAL(FNetworkNotify::NotifyAcceptedConnection, );
71
80
85 virtual void NotifyControlMessage(UNetConnection* Connection, uint8 MessageType, class FInBunch& Bunch) PURE_VIRTUAL(FNetworkNotify::NotifyReceivedText, );
86};
87
104
106{
107 switch (Response)
108 {
110 return TEXT("Failure");
112 return TEXT("Success");
114 return TEXT("InvalidToken");
116 return TEXT("NoKey");
118 return TEXT("SessionIdMismatch");
120 return TEXT("InvalidParams");
121 default:
122 break;
123 }
124
125 checkf(false, TEXT("Missing EncryptionResponse Type: %d"), static_cast<const int32>(Response));
126 return TEXT("");
127}
128
149
160
163{
164 /* Unknown type of cheat punishment */
165 Unknown,
169 KickMatch,
172};
173
174inline const TCHAR* const LexToString(const ECheatPunishType Response)
175{
176 switch (Response)
177 {
179 return TEXT("Unknown");
181 return TEXT("KickClient");
183 return TEXT("KickMatch");
185 return TEXT("PunishInfo");
186 default:
187 break;
188 }
189
190 checkf(false, TEXT("Missing ECheatPunishType Type: %d"), static_cast<const int32>(Response));
191 return TEXT("");
192}
193
201
204{
205 Unknown,
208};
209
214{
217 , NetDriver(nullptr)
218 , OwningObject(nullptr)
219 , Property(nullptr)
220 , LoadedObject(nullptr) {}
221
224
227
230
233
236};
237
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
#define PURE_VIRTUAL(func,...)
Definition CoreMiscDefines.h:103
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
auto Response
Definition ExternalRpcRegistry.cpp:598
EEncryptionFailureAction
Definition NetworkDelegates.h:152
EEncryptionResponse
Definition NetworkDelegates.h:90
ECheatPunishType
Definition NetworkDelegates.h:163
ENetSyncLoadType
Definition NetworkDelegates.h:204
const TCHAR *const LexToString(const EEncryptionResponse Response)
Definition NetworkDelegates.h:105
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition DataBunch.h:127
Definition NetworkDelegates.h:239
DECLARE_DELEGATE_RetVal_OneParam(EEncryptionFailureAction, FReceivedNetworkEncryptionFailure, UNetConnection *)
static ENGINE_API FOnPendingNetGameConnectionCreated OnPendingNetGameConnectionCreated
Definition NetworkDelegates.h:294
DECLARE_MULTICAST_DELEGATE_OneParam(FOnSyncLoadDetected, const FNetSyncLoadReport &)
static ENGINE_API FOnSyncLoadDetected OnSyncLoadDetected
Definition NetworkDelegates.h:304
static ENGINE_API FReceivedNetworkEncryptionFailure OnReceivedNetworkEncryptionFailure
Definition NetworkDelegates.h:274
DECLARE_DELEGATE_FourParams(FNetworkCheatDetected, const class FUniqueNetId &, ECheatPunishType, const FString &, const FString &)
DECLARE_DELEGATE_TwoParams(FReceivedNetworkEncryptionToken, const FString &, const FOnEncryptionKeyResponse &)
static ENGINE_API FNetworkCheatDetected OnNetworkCheatDetected
Definition NetworkDelegates.h:286
DECLARE_DELEGATE_OneParam(FReceivedNetworkEncryptionAck, const FOnEncryptionKeyResponse &)
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPendingNetGameConnectionCreated, UPendingNetGame *)
static ENGINE_API FReceivedNetworkEncryptionAck OnReceivedNetworkEncryptionAck
Definition NetworkDelegates.h:262
static ENGINE_API FReceivedNetworkEncryptionToken OnReceivedNetworkEncryptionToken
Definition NetworkDelegates.h:252
Definition NetworkDelegates.h:56
virtual void virtual NotifyAcceptedConnection(class UNetConnection *Connection) PURE_VIRTUAL(FNetworkNotify boo NotifyAcceptingChannel)(class UChannel *Channel) PURE_VIRTUAL(FNetworkNotify
Definition NetworkDelegates.h:79
virtual EAcceptConnection::Type NotifyAcceptingConnection() PURE_VIRTUAL(FNetworkNotify
Definition NetworkDelegates.h:63
Definition UnrealType.h:174
Definition CoreOnline.h:102
Definition Channel.h:63
Definition NetConnection.h:284
Definition NetDriver.h:799
Definition Object.h:95
Definition PendingNetGame.h:24
Definition NetworkDelegates.h:19
Type
Definition NetworkDelegates.h:21
@ Accept
Definition NetworkDelegates.h:25
@ Ignore
Definition NetworkDelegates.h:27
@ Reject
Definition NetworkDelegates.h:23
@ false
Definition radaudio_common.h:23
Definition CoreNet.h:739
Definition NetworkDelegates.h:130
EEncryptionResponse Response
Definition NetworkDelegates.h:132
FString ErrorMsg
Definition NetworkDelegates.h:134
FEncryptionData EncryptionData
Definition NetworkDelegates.h:136
FEncryptionKeyResponse()
Definition NetworkDelegates.h:138
FEncryptionKeyResponse(EEncryptionResponse InResponse, const FString &InErrorMsg)
Definition NetworkDelegates.h:143
Definition NetworkDelegates.h:214
const UObject * LoadedObject
Definition NetworkDelegates.h:235
const UNetDriver * NetDriver
Definition NetworkDelegates.h:226
const FProperty * Property
Definition NetworkDelegates.h:232
ENetSyncLoadType Type
Definition NetworkDelegates.h:223
const UObject * OwningObject
Definition NetworkDelegates.h:229
FNetSyncLoadReport()
Definition NetworkDelegates.h:215