UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RPCDoSDetection.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"
7#include "UObject/CoreNet.h"
9
10#include "RPCDoSDetection.generated.h"
11
12
13// Defines
14
16#define RPC_QUOTA_DEBUG 0
17
19#define RPC_DOS_DEV_STATS 0
20
22#define RPC_DOS_SCOPE_DEBUG 1
23
24
25// Typedefs
26
33
40
45
46
47// Globals/CVars
48
49#if RPC_DOS_SCOPE_DEBUG
50namespace UE::Net
51{
54}
55#endif
56
57
58// Structs
59
64{
67
69 double AccumRPCTime = 0.0;
70
71#if RPC_QUOTA_DEBUG
73 double DebugAccumRPCTime = 0.0;
74#endif
75
76
77public:
82 {
83 RPCCounter = 0;
84 AccumRPCTime = 0.0;
85
86#if RPC_QUOTA_DEBUG
88#endif
89 }
90
97 {
98 RPCCounter += InCounter.RPCCounter;
99 AccumRPCTime += InCounter.AccumRPCTime;
100
101#if RPC_QUOTA_DEBUG
102 DebugAccumRPCTime += InCounter.DebugAccumRPCTime;
103#endif
104 }
105};
106
111{
112 Unchecked, // The status for this RPC has not been checked
113 OnAllowList, // The RPC is allow listed and can't be blocked
114 NotBlocked, // The RPC is not blocked
115 Blocked // The RPC is blocked
116};
117
122{
125
128
131
134
137
138
139public:
146 {
147 static_assert(UE_ARRAY_COUNT(PerPeriodHistory) == 16, "PerPeriodHistory must be 16 in size, for GetCurrentHistoryIdx to work.");
148
149 return LastTrackedSecondIncrement & 0xF;
150 }
151};
152
157{
159 void* Key = nullptr;
160
163};
164
165
169USTRUCT()
171{
173
174
175 UPROPERTY(config)
176 bool bLogEscalate = false;
177
179 UPROPERTY(config)
180 bool bSendEscalateAnalytics = false;
181
183 UPROPERTY(config)
184 bool bKickPlayer = false;
185
187 UPROPERTY(config)
188 bool bTrackRecentRPCs = false;
189
190
194 UPROPERTY(config)
195 int16 EscalateQuotaRPCsPerFrame = -1;
196
198 UPROPERTY(config)
199 int16 EscalateTimeQuotaMSPerFrame = -1;
200
202 UPROPERTY(config)
203 int16 EscalateQuotaRPCsPerPeriod = -1;
204
206 UPROPERTY(config)
207 int16 EscalateTimeQuotaMSPerPeriod = -1;
208
210 UPROPERTY(config)
211 int8 EscalateQuotaTimePeriod = -1;
212
213
217 UPROPERTY(config)
218 int8 EscalationCountTolerance = 1;
219
221 UPROPERTY(config)
222 int16 EscalationTimeToleranceMS = -1;
223
224
228 UPROPERTY(config)
229 int16 RPCRepeatLimitPerPeriod = -1;
230
232 UPROPERTY(config)
233 int16 RPCRepeatLimitMSPerPeriod = -1;
234
236 UPROPERTY(config)
237 int8 RPCRepeatLimitTimePeriod = -1;
238
239
241 UPROPERTY(config)
242 int16 CooloffTime = -1;
243
245 UPROPERTY(config)
246 int16 AutoEscalateTime = -1;
247
248
252 double EscalateTimeQuotaSecsPerFrame = 0.0;
253
255 double EscalateTimeQuotaSecsPerPeriod = 0.0;
256
258 double RPCRepeatLimitSecsPerPeriod = 0.0;
259
261 double EscalationTimeToleranceSeconds = 0.0;
262
263
264public:
266 {
267 }
268
272 ENGINE_API virtual void ApplyImpliedValues();
273
281 bool HasHitQuota_Count(const FRPCDoSCounters(&PerPeriodHistory)[16], FRPCDoSCounters& InFrameCounter) const;
282
290 bool HasHitQuota_Time(const FRPCDoSCounters(&PerPeriodHistory)[16], FRPCDoSCounters& InFrameCounter) const;
291};
292
296USTRUCT()
298{
300
301
302 FString SeverityCategory;
303
304
305private:
309 int8 HighestTimePeriod = 0;
310
312 TArray<int8> AllTimePeriods;
313
314
315public:
319 bool bEscalationConfirmed = false;
320
322 int16 EscalationCount = 0;
323
324
325public:
326 ENGINE_API virtual void ApplyImpliedValues() override;
327
336 bool LoadStructConfig(const TCHAR* SectionName, const TCHAR* InFilename=nullptr);
337
341 void ValidateConfig();
342
348 int8 GetHighestTimePeriod() const;
349
355 const TArray<int8>& GetAllTimePeriods() const;
356
363 void ApplyState(FRPCDoSState& Target);
364};
365
366
367
372{
373 ExecuteRPC, // Allow the RPC to execute
374 BlockRPC // Block the RPC from executing
375};
376
381{
382 Escalate, // Escalating to a higher RPC DoS escalation state
383 AutoEscalate, // Automatic/non-RPC escalation to a higher RPC DoS escalation state, e.g. when too much time was spent in a lower state
384 Deescalate // Deescalating to a lower RPC DoS escalation state
385};
386
391{
392 CountLimit, // RPC Count quota's were hit
393 TimeLimit, // RPC Time quota's were hit
394 AutoEscalate, // Automatic escalation from a lower state, e.g. after spending too much time in a lower state
395 Deescalate // Deescalation to a lower state
396};
397
402{
403 MidPacket, // End of RPC sequence while still processing packet
404 PostPacket // End of RPC sequence after a packet has finished processing
405};
406
407
408
419{
420 friend struct FRPCDoSStateConfig;
421
425 struct FLightweightRPCTracking
426 {
428 static constexpr int32 TrackingNum = 256;
429
438
439
441 FLightweightRPCEntry RPC[TrackingNum] = {};
442
444 uint8 Count = 0;
445 };
446
447public:
458 void Init(FName NetDriverName, TSharedPtr<FNetAnalyticsAggregator>& AnalyticsAggregator, FGetWorld&& InWorldFunc,
460
466 void InitConfig(FName NetDriverName);
467
474 UE_DEPRECATED(5.1, "UpdateSeverity will be made private soon.")
476 {
477 UpdateSeverity_Private(Update, Reason);
478 }
479
480
486 void PreTickDispatch(double TimeSeconds);
487
493 void PreReceivedPacket(double TimeSeconds)
494 {
495 using namespace UE::Net;
496
497#if RPC_DOS_DEV_STATS
499#endif
500
501#if RPC_DOS_SCOPE_DEBUG
502 ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
503 ensure(GRPCDoSScopeDebugging == 0 || !SequentialRPCScopePrivate.IsActive());
504#endif
505
506 PacketScopePrivate.SetActive(true);
507
508 FPacketScope& PacketScope = GetPacketScope();
509
510 PacketScope.ReceivedPacketStartTime = TimeSeconds;
511
512 // Redundant call to Reset for sequential RPC scope - remove when scope debugging verifies the sequential RPC scope is never active here
513#if 1 // !RPC_DOS_SCOPE_DEBUG
514 SequentialRPCScopePrivate.Reset();
515#endif
516 }
517
529 FName FunctionName)
530 {
532
533#if RPC_DOS_DEV_STATS
535#endif
536
537 if (bRPCDoSDetection && !bHitchSuspendDetection)
538 {
539 if (!SequentialRPCScopePrivate.IsActive())
540 {
541 PreSequentialRPC();
542 }
543
544 if (bRPCTrackingEnabled)
545 {
546 FSequentialRPCScope& SequentialRPCScope = GetSequentialRPCScope();
547
548 Result = SequentialRPCScope.CheckRPCTracking(*this, Function, FunctionName);
549 }
550
551#if RPC_QUOTA_DEBUG
552 FSequentialRPCScope& SequentialRPCScope = GetSequentialRPCScope();
553
554 SequentialRPCScope.DebugReceivedRPCStartTime = FPlatformTime::Seconds();
555#endif
556 }
557
558
559 return Result;
560 }
561
571 {
572#if RPC_DOS_DEV_STATS
574#endif
575
576 if (bRPCDoSDetection && !bHitchSuspendDetection)
577 {
578 if (!SequentialRPCScopePrivate.IsActive())
579 {
580 PreSequentialRPC();
581 }
582
583 if (UNLIKELY(ForcedRPCTracking == FunctionName && FMath::FRand() <= ForcedRPCTrackingChance))
584 {
585 EnableForcedRPCTracking(Function, FunctionName, FPlatformTime::Seconds());
586 }
587 else
588 {
589 FSequentialRPCScope& SequentialRPCScope = GetSequentialRPCScope();
590 FLightweightRPCTracking& LightweightRPCTracking = SequentialRPCScope.LightweightRPCTracking;
591 FLightweightRPCTracking::FLightweightRPCEntry& CurEntry = LightweightRPCTracking.RPC[LightweightRPCTracking.Count++];
592
593 CurEntry.Function = Function;
594 CurEntry.Name = FunctionName;
595 }
596 }
597 }
598
603 {
604#if RPC_DOS_DEV_STATS
606#endif
607
608#if RPC_QUOTA_DEBUG
609 {
610 FPacketScope& PacketScope = GetPacketScope();
611
612 PacketScope.DebugReceivedRPCEndTime = FPlatformTime::Seconds();
613 FrameCounter.DebugAccumRPCTime += (PacketScope.DebugReceivedRPCEndTime - PacketScope.DebugReceivedRPCStartTime);
614 }
615#endif
616
617 if (bRPCDoSDetection && !bHitchSuspendDetection)
618 {
619 FTickScope& TickScope = GetTickScope();
620 FPacketScope& PacketScope = GetPacketScope();
621 FSequentialRPCScope& SequentialRPCScope = GetSequentialRPCScope();
622
623 TickScope.FrameCounter.RPCCounter++;
624
625 RPCIntervalCounter++;
626 SequentialRPCScope.ReceivedPacketRPCCount++;
627 PacketScope.bPacketContainsRPC = true;
628
629 TickScope.CondCheckCountQuota(*this);
630 }
631 }
632
641 void PostSequentialRPC(EPostSequentialRPCType SequenceType, double TimeSeconds, FRPCDoSCounters* RPCCounter,
643
649 void PostReceivedPacket(double TimeSeconds)
650 {
651 using namespace UE::Net;
652
653#if RPC_DOS_DEV_STATS
655#endif
656
657 if (GetPacketScope().bPacketContainsRPC)
658 {
659 PostReceivedRPCPacket(TimeSeconds);
660 }
661
662 ReceivedPacketEndTime = TimeSeconds;
663
664 PacketScopePrivate.SetActive(false);
665
666#if RPC_DOS_SCOPE_DEBUG
667 ensure(GRPCDoSScopeDebugging == 0 || !SequentialRPCScopePrivate.IsActive());
668 ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
669#endif
670 }
671
678 void PostReceivedRPCPacket(double TimeSeconds);
679
683 void PostTickDispatch();
684
688 void NotifyClose();
689
690
697 {
698#if RPC_QUOTA_DEBUG
699 return true;
700#endif
701
702 return bRPCTrackingEnabled;
703 }
704
709 {
710 return bRPCDoSDetection;
711 }
712
719
726
733
734
735private:
739 void PreSequentialRPC()
740 {
741 using namespace UE::Net;
742
743#if RPC_DOS_SCOPE_DEBUG
744 ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
745 ensure(GRPCDoSScopeDebugging == 0 || PacketScopePrivate.IsActive());
746#endif
747
748 SequentialRPCScopePrivate.SetActive(true);
749 }
750
757 void UpdateSeverity_Private(ERPCDoSSeverityUpdate Update, ERPCDoSEscalateReason Reason);
758
764 void InitState(double TimeSeconds);
765
769 void CondCheckCountQuota()
770 {
771 // 64 RPC interval
772 if ((RPCIntervalCounter & 0x3F) == 0)
773 {
774 FTickScope& TickScope = GetTickScope();
775
776 if (HasHitQuota_Count(CounterPerPeriodHistory, TickScope.FrameCounter))
777 {
779 }
780 }
781 }
782
788 void CondCheckTimeQuota(double TimeSeconds)
789 {
790 if (TimeSeconds > NextTimeQuotaCheck)
791 {
792 FTickScope& TickScope = GetTickScope();
793
794 NextTimeQuotaCheck = TimeSeconds + TimeQuotaCheckInterval;
795
796 if (HasHitQuota_Time(CounterPerPeriodHistory, TickScope.FrameCounter))
797 {
799 }
800 }
801 }
802
811 ERPCNotifyResult CheckRPCTracking(UFunction* Function, FName FunctionName);
812
820 void RecalculatePeriodHistory(const TArray<int8>& InTimePeriods, FRPCDoSCounters(&OutPerPeriodHistory)[16],
822
823
829 void EnableRPCTracking(double TimeSeconds);
830
838 void EnableForcedRPCTracking(UFunction* Function, FName FunctionName, double TimeSeconds);
839
845 void DisableRPCTracking(double TimeSeconds);
846
854 FRPCTrackingInfo& FindOrAddRPCTracking(UFunction* InFunc, bool& bOutNewTracking)
855 {
856 TSharedPtr<FRPCTrackingInfo>& SharedResult = RPCTracking.FindOrAdd(InFunc);
857
858 if (!SharedResult.IsValid())
859 {
861
862 ActiveRPCTracking.Add({InFunc, SharedResult.Get()});
863
864 bOutNewTracking = true;
865 }
866
867 return *SharedResult.Get();
868 }
869
875 void ClearStaleRPCTracking(double TimeSeconds);
876
877
881 void CachePlayerAddress();
882
886 void CachePlayerUID();
887
893 const FString& GetPlayerAddress()
894 {
895 return CachedAddress;
896 }
897
903 const FString& GetPlayerUID()
904 {
905 return CachedPlayerUID;
906 }
907
908
909private:
911 template<class T>
912 class TScopeBase
913 {
914 public:
916 inline void SetActive(bool bInVal)
917 {
918 using namespace UE::Net;
919
920#if RPC_DOS_SCOPE_DEBUG
921 ensure(GRPCDoSScopeDebugging == 0 || bScopeActive != bInVal);
922#endif
923
924 bScopeActive = bInVal;
925
926 Reset();
927 }
928
930 inline bool IsActive() const
931 {
932 return bScopeActive;
933 }
934
936 inline void Reset()
937 {
938 static_cast<T*>(this)->Reset();
939 }
940
941 private:
943 bool bScopeActive = false;
944 };
945
947 class FTickScope : public TScopeBase<FTickScope>
948 {
949 public:
951 inline void UpdateSeverity(FRPCDoSDetection& This, ERPCDoSSeverityUpdate Update, ERPCDoSEscalateReason Reason)
952 {
953 This.UpdateSeverity_Private(Update, Reason);
954 }
955
957 inline void CondCheckCountQuota(FRPCDoSDetection& This)
958 {
959 This.CondCheckCountQuota();
960 }
961
963 inline void CondCheckTimeQuota(FRPCDoSDetection& This, double TimeSeconds)
964 {
965 This.CondCheckTimeQuota(TimeSeconds);
966 }
967
968 void Reset()
969 {
970 FrameCounter.ResetRPCCounters();
971 }
972
973 public:
975 FRPCDoSCounters FrameCounter;
976 };
977
979 FTickScope TickScopePrivate;
980
981
983 inline FTickScope& GetTickScope()
984 {
985 using namespace UE::Net;
986
987#if RPC_DOS_SCOPE_DEBUG
988 ensure(GRPCDoSScopeDebugging == 0 || TickScopePrivate.IsActive());
989#endif
990
991 return TickScopePrivate;
992 }
993
994
996 class FPacketScope : public TScopeBase<FPacketScope>
997 {
998 public:
1000 bool bPacketContainsRPC = false;
1001
1003 double ReceivedPacketStartTime = 0.0;
1004
1005
1006 public:
1007 void Reset()
1008 {
1009 bPacketContainsRPC = false;
1010 ReceivedPacketStartTime = 0.0;
1011 }
1012 };
1013
1015 FPacketScope PacketScopePrivate;
1016
1017
1019 inline FPacketScope& GetPacketScope()
1020 {
1021 using namespace UE::Net;
1022
1023#if RPC_DOS_SCOPE_DEBUG
1024 ensure(GRPCDoSScopeDebugging == 0 || PacketScopePrivate.IsActive());
1025#endif
1026
1027 return PacketScopePrivate;
1028 }
1029
1031 class FSequentialRPCScope : public TScopeBase<FSequentialRPCScope>
1032 {
1033 public:
1035 inline void CondCheckCountQuota(FRPCDoSDetection& This)
1036 {
1037 This.CondCheckCountQuota();
1038 }
1039
1041 inline void CondCheckTimeQuota(FRPCDoSDetection& This, double TimeSeconds)
1042 {
1043 This.CondCheckTimeQuota(TimeSeconds);
1044 }
1045
1047 inline ERPCNotifyResult CheckRPCTracking(FRPCDoSDetection& This, UFunction* Function, FName FunctionName)
1048 {
1049 return This.CheckRPCTracking(Function, FunctionName);
1050 }
1051
1053 inline FRPCTrackingInfo& FindOrAddRPCTracking(FRPCDoSDetection& This, UFunction* InFunc, bool& bOutNewTracking)
1054 {
1055 return This.FindOrAddRPCTracking(InFunc, bOutNewTracking);
1056 }
1057
1058 void Reset()
1059 {
1060 bReceivedPacketRPCUnique = true;
1061 ReceivedPacketRPCCount = 0;
1062 LightweightRPCTracking.Count = 0;
1063 PostReceivedRPCName = NAME_None;
1064 PostReceivedRPCTracking = nullptr;
1065 PostReceivedRPCCounter = nullptr;
1066 PostReceivedRPCBlockCount = 0;
1067 LastReceivedRPCTimeCache = 0.0;
1068
1069#if RPC_QUOTA_DEBUG
1072#endif
1073 }
1074
1075 public:
1077 bool bReceivedPacketRPCUnique = true;
1078
1080 int32 ReceivedPacketRPCCount = 0;
1081
1083 FLightweightRPCTracking LightweightRPCTracking;
1084
1085
1087 FName PostReceivedRPCName;
1088
1090 FRPCTrackingInfo* PostReceivedRPCTracking = nullptr;
1091
1093 FRPCDoSCounters* PostReceivedRPCCounter = nullptr;
1094
1096 int32 PostReceivedRPCBlockCount = 0;
1097
1099 double LastReceivedRPCTimeCache = 0.0;
1100
1101#if RPC_QUOTA_DEBUG
1103 double DebugReceivedRPCStartTime = 0.0;
1104
1106 double DebugReceivedRPCEndTime = 0.0;
1107#endif
1108 };
1109
1111 FSequentialRPCScope SequentialRPCScopePrivate;
1112
1114 inline FSequentialRPCScope& GetSequentialRPCScope()
1115 {
1116 using namespace UE::Net;
1117
1118#if RPC_DOS_SCOPE_DEBUG
1119 ensure(GRPCDoSScopeDebugging == 0 || SequentialRPCScopePrivate.IsActive());
1120#endif
1121
1122 return SequentialRPCScopePrivate;
1123 }
1124
1125
1126private:
1128 bool bRPCDoSDetection = false;
1129
1131 bool bRPCDoSAnalytics = false;
1132
1134 int32 HitchTimeQuotaMS = 0;
1135
1137 int32 HitchSuspendDetectionTimeMS = 0;
1138
1140 TArray<FName> RPCBlockAllowList;
1141
1143 FName ForcedRPCTracking;
1144
1146 double ForcedRPCTrackingChance = 1.0;
1147
1149 double ForcedRPCTrackingLength = 0.0;
1150
1152 double ForcedRPCTrackingEndTime = 0.0;
1153
1154
1156 FGetRPCDoSAddress AddressFunc;
1157
1159 FString CachedAddress;
1160
1162 FGetRPCDoSPlayerUID PlayerUIDFunc;
1163
1165 FString CachedPlayerUID;
1166
1168 FRPCDoSKickPlayer KickPlayerFunc;
1169
1170
1172 TArray<FRPCDoSStateConfig> DetectionSeverity;
1173
1175 int8 ActiveState = 0;
1176
1178 int8 WorstActiveState = 0;
1179
1181 int8 WorstAnalyticsState = 0;
1182
1184 double LastMetEscalationConditions = 0.0;
1185
1187 bool bHitchSuspendDetection = false;
1188
1190 double HitchSuspendDetectionStartTime = 0.0;
1191
1192
1194 FRPCDoSCounters SecondCounter;
1195
1197 double LastPerSecQuotaBegin = 0.0;
1198
1200 TArray<FRPCDoSCounters> CounterPerSecHistory;
1201
1203 int32 LastCounterPerSecHistoryIdx = 0;
1204
1206 FRPCDoSCounters CounterPerPeriodHistory[16] = {};
1207
1209 uint8 SecondsIncrementer = 0;
1210
1211
1213 double ReceivedPacketEndTime = 0.0;
1214
1216 double LastPreTickDispatchTime = 0.0;
1217
1219 uint32 RPCIntervalCounter = 0;
1220
1222 double NextTimeQuotaCheck = 0.0;
1223
1225 static constexpr double TimeQuotaCheckInterval = 0.005;
1226
1227
1229 bool bRPCTrackingEnabled = false;
1230
1232 int8 MaxRPCTrackingPeriod = 0;
1233
1236
1238 TArray<FActiveRPCTrackingInfo> ActiveRPCTracking;
1239
1241 static constexpr int32 DefaultActiveRPCTrackingSize = 128;
1242
1244 double LastRPCTrackingClean = 0.0;
1245
1246
1248 FRPCDoSAnalyticsVars AnalyticsVars;
1249
1252
1254 double AnalyticsMinTimePerSecThreshold = 0.0;
1255
1257 double LastAnalyticsThresholdRecalc = 0.0;
1258};
1259
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define ensure( InExpression)
Definition AssertionMacros.h:464
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int16 int16
A 16-bit signed integer.
Definition Platform.h:1123
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
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
#define UNLIKELY(x)
Definition Platform.h:857
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define CSV_SCOPED_TIMING_STAT_EXCLUSIVE(StatName)
Definition CsvProfiler.h:152
void Init()
Definition LockFreeList.h:4
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
ERPCBlockState
Definition RPCDoSDetection.h:111
ERPCDoSSeverityUpdate
Definition RPCDoSDetection.h:381
ERPCNotifyResult
Definition RPCDoSDetection.h:372
EPostSequentialRPCType
Definition RPCDoSDetection.h:402
ERPCDoSEscalateReason
Definition RPCDoSDetection.h:391
#define UE_ARRAY_COUNT(array)
Definition UnrealTemplate.h:212
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition CoreNet.h:415
Definition RPCDoSDetection.h:419
void PostSequentialRPC(EPostSequentialRPCType SequenceType, double TimeSeconds, FRPCDoSCounters *RPCCounter, FRPCTrackingInfo *RPCTrackingInfo)
Definition RPCDoSDetection.cpp:870
void LightweightReceivedRPC(UFunction *Function, FName FunctionName)
Definition RPCDoSDetection.h:570
void InitConfig(FName NetDriverName)
Definition RPCDoSDetection.cpp:368
void PostReceivedRPCPacket(double TimeSeconds)
Definition RPCDoSDetection.cpp:984
bool ShouldMonitorReceivedRPC() const
Definition RPCDoSDetection.h:696
void PreReceivedPacket(double TimeSeconds)
Definition RPCDoSDetection.h:493
void PostReceivedPacket(double TimeSeconds)
Definition RPCDoSDetection.h:649
void NotifyClose()
Definition RPCDoSDetection.cpp:1041
void PreTickDispatch(double TimeSeconds)
Definition RPCDoSDetection.cpp:755
void PostTickDispatch()
Definition RPCDoSDetection.cpp:1024
void SetPlayerUIDFunc(FGetRPCDoSPlayerUID &&InPlayerUIDFunc)
Definition RPCDoSDetection.cpp:1386
void SetAddressFunc(FGetRPCDoSAddress &&InAddressFunc)
Definition RPCDoSDetection.cpp:1374
void UpdateSeverity(ERPCDoSSeverityUpdate Update, ERPCDoSEscalateReason Reason)
Definition RPCDoSDetection.h:475
void PostReceivedRPC()
Definition RPCDoSDetection.h:602
void SetKickPlayerFunc(FRPCDoSKickPlayer &&InKickPlayerFunc)
Definition RPCDoSDetection.cpp:1398
bool IsRPCDoSDetectionEnabled() const
Definition RPCDoSDetection.h:708
ERPCNotifyResult NotifyReceivedRPC(FNetBitReader &Reader, TSet< FNetworkGUID > &UnmappedGuids, UObject *Object, UFunction *Function, FName FunctionName)
Definition RPCDoSDetection.h:528
Definition Array.h:670
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition Class.h:2476
Definition Object.h:95
Definition NetworkVersion.cpp:28
int32 GRPCDoSScopeDebugging
@ false
Definition radaudio_common.h:23
Definition RPCDoSDetection.h:157
void * Key
Definition RPCDoSDetection.h:159
const FRPCTrackingInfo * TrackingInfo
Definition RPCDoSDetection.h:162
static double Seconds()
Definition AndroidPlatformTime.h:20
Definition RPCDoSDetectionAnalytics.h:152
Definition RPCDoSDetection.h:64
double AccumRPCTime
Definition RPCDoSDetection.h:69
void AccumulateCounter(const FRPCDoSCounters &InCounter)
Definition RPCDoSDetection.h:96
void ResetRPCCounters()
Definition RPCDoSDetection.h:81
int32 RPCCounter
Definition RPCDoSDetection.h:66
UFunction * Function
Definition RPCDoSDetection.h:433
Definition RPCDoSDetection.h:298
Definition RPCDoSDetection.h:171
bool HasHitQuota_Time(const FRPCDoSCounters(&PerPeriodHistory)[16], FRPCDoSCounters &InFrameCounter) const
Definition RPCDoSDetection.cpp:161
bool HasHitQuota_Count(const FRPCDoSCounters(&PerPeriodHistory)[16], FRPCDoSCounters &InFrameCounter) const
Definition RPCDoSDetection.cpp:137
Definition RPCDoSDetection.h:122
uint8 LastTrackedSecondIncrement
Definition RPCDoSDetection.h:130
TSharedPtr< FRPCAnalytics > RPCTrackingAnalyticsEntry
Definition RPCDoSDetection.h:136
ERPCBlockState BlockState
Definition RPCDoSDetection.h:133
FRPCDoSCounters PerPeriodHistory[16]
Definition RPCDoSDetection.h:124
uint8 HistoryCount
Definition RPCDoSDetection.h:127
uint8 GetCurrentHistoryIdx() const
Definition RPCDoSDetection.h:145