UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetEnums.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#include "NetEnums.generated.h"
8
9namespace UE::Net
10{
11 enum class EJoinFlags
12 {
13 None,
14 NoPawn = 1,
15 };
17}
18
20UENUM(BlueprintType)
49
50namespace ENetworkFailure
51{
52 inline const TCHAR* ToString(ENetworkFailure::Type FailureType)
53 {
54 switch (FailureType)
55 {
57 return TEXT("NetDriverAlreadyExists");
59 return TEXT("NetDriverCreateFailure");
61 return TEXT("NetDriverListenFailure");
62 case ConnectionLost:
63 return TEXT("ConnectionLost");
65 return TEXT("ConnectionTimeout");
66 case FailureReceived:
67 return TEXT("FailureReceived");
68 case OutdatedClient:
69 return TEXT("OutdatedClient");
70 case OutdatedServer:
71 return TEXT("OutdatedServer");
73 return TEXT("PendingConnectionFailure");
74 case NetGuidMismatch:
75 return TEXT("NetGuidMismatch");
77 return TEXT("NetChecksumMismatch");
78 }
79 return TEXT("Unknown ENetworkFailure error occurred.");
80 }
81}
82
83UENUM(BlueprintType)
85{
86 Default,
87 Generic,
88 Iris,
89};
90
91// (DEPRECATED) Security event types used for UE_SECURITY_LOG
93{
94 enum Type
95 {
96 Malformed_Packet = 0, // The packet didn't follow protocol
97 Invalid_Data = 1, // The packet contained invalid data
98 Closed = 2 // The connection had issues (potentially malicious) and was closed
99 };
100
102 inline const TCHAR* ToString(const ESecurityEvent::Type EnumVal)
103 {
104 switch (EnumVal)
105 {
106 case Malformed_Packet:
107 {
108 return TEXT("Malformed_Packet");
109 }
110 case Invalid_Data:
111 {
112 return TEXT("Invalid_Data");
113 }
114 case Closed:
115 {
116 return TEXT("Closed");
117 }
118 }
119 return TEXT("");
120 }
121}
122
123namespace UE::Net
124{
125
130{
131 None = 0x00,
132 BitstreamCorrupted, // An error while reading detected an irrecoverable bitstream corruption. Client was forced to disconnect
133 ReplicationDisabled, // An error while reading was recoverable but prevents this NetObject from replicating.
134 BlockedByMustBeMapped, // An object is blocked due to MustBeMapped references not resolving fast enough
135 BlockedByCreationParents, // An object is blocked waiting on creation parents that do not exist yet on the client.
136};
137
139{
140 switch (NetRefHandleError)
141 {
143 {
144 return TEXT("None");
145 } break;
147 {
148 return TEXT("BitstreamCorrupted");
149 } break;
151 {
152 return TEXT("ReplicationDisabled");
153 } break;
155 {
156 return TEXT("BlockedByMustBeMapped");
157 } break;
159 {
160 return TEXT("BlockedByCreationParents");
161 } break;
162 default:
163 {
164 return TEXT("missing");
165 }
166 }
167}
168
169} // end namespace UE::Net
#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
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
EReplicationSystem
Definition NetEnums.h:85
#define UENUM(...)
Definition ObjectMacros.h:749
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NetEnums.h:22
Type
Definition NetEnums.h:24
@ NetChecksumMismatch
Definition NetEnums.h:46
@ FailureReceived
Definition NetEnums.h:36
@ NetDriverAlreadyExists
Definition NetEnums.h:26
@ OutdatedServer
Definition NetEnums.h:40
@ ConnectionLost
Definition NetEnums.h:32
@ OutdatedClient
Definition NetEnums.h:38
@ ConnectionTimeout
Definition NetEnums.h:34
@ PendingConnectionFailure
Definition NetEnums.h:42
@ NetGuidMismatch
Definition NetEnums.h:44
@ NetDriverListenFailure
Definition NetEnums.h:30
@ NetDriverCreateFailure
Definition NetEnums.h:28
Definition NetEnums.h:93
Type
Definition NetEnums.h:95
@ Closed
Definition NetEnums.h:98
@ Malformed_Packet
Definition NetEnums.h:96
@ Invalid_Data
Definition NetEnums.h:97
@ None
Definition ReplicationDataStreamDebug.h:25
Definition NetworkVersion.cpp:28
const TCHAR * LexToString(UE::Net::EStopReplicatingReason Reason)
Definition EngineReplicationBridge.cpp:121
ENetRefHandleError
Definition NetEnums.h:130
EJoinFlags
Definition NetEnums.h:12