UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CoreNetContext.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6
7#define UE_API COREUOBJECT_API
8
9class UFunction;
10
11namespace UE::Net::Private
12{
13 // Indicates whether a the current scope of a ProcessEvent is call is due to
14 // receiving or sending a "Remote"-specified RPC, or not processing a "Remote" RPC at all.
16 {
17 None,
20 };
21
22 // Global state required by the replication system, that also needs to be
23 // accessible to generated code.
25 {
26 public:
28
29 // Returns the "Remote" function mode currently at the top of the stack.
30 // Used internally to determine whether a "Remote"-specified function
31 // should be run locally or sent over the network as an RPC instead.
33
34 private:
36
37 // Since Remote-specified functions don't run locally and can't recurse in the same callstack,
38 // the stack count shouldn't grow beyond 2.
39 static constexpr uint32 MaxRemoteStackSize = 2;
41 };
42
43 // Used internally to indicate whether a ProcessEvent call within the scope is due
44 // to sending or receiving a "Remote"-specified UFUNCTION as an RPC.
46 {
47 public:
50
51 private:
52 bool bAddToStack = false;
53 };
54}
55
56#undef UE_API
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_API
Definition SColorGradingComponentViewer.h:12
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Array.h:670
Definition CoreNetContext.h:25
COREUOBJECT_API ERemoteFunctionMode GetCurrentRemoteFunctionMode()
Definition CoreNetContext.cpp:27
static COREUOBJECT_API FCoreNetContext * Get()
Definition CoreNetContext.cpp:9
Definition CoreNetContext.h:46
UE_API ~FScopedRemoteRPCMode()
Definition CoreNetContext.cpp:46
Definition Class.h:2476
Definition NetworkVersion.cpp:28
@ None
Definition ReplicationDataStreamDebug.h:25
ERemoteFunctionMode
Definition CoreNetContext.h:16