UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NetExports.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
7
8namespace UE::Net
9{
10 enum class EPacketDeliveryStatus : uint8;
11}
12
13namespace UE::Net::Private
14{
15
17{
18public:
19
20 // Simple scope to make sure we set the correct ExportContext and restore the old one when we exit the scope
35
36public:
37
38 // Call at the beginning of the packet to store the current state of exports
40
41 // Commit exports from exported during current batch
43
44 // Call at the end of the packet to store record of any new exports committed during the frame
46
48
49 // Explicitly acknowledge exports, this is used for exports originating from out of band batches
51
52 // Construct a new export scope
54
55private:
56
57 struct FExportInfo
58 {
59 uint32 NetHandleExportCount;
60 uint32 NetTokenExportCount;
61 };
62
63 FExportInfo PopExportRecord();
64
65private:
66
70
71 FExportInfo CurrentExportInfo;
72
73 // Export state
75};
76
77inline FNetExports::FExportScope::FExportScope(FNetSerializationContext& InContext, const FNetExportContext::FAcknowledgedExports& AcknowledgedExports, FNetExportContext::FBatchExports& BatchExports)
78 : ExportContext(AcknowledgedExports, BatchExports)
80 , OldExportContext(InContext.GetExportContext())
81{
82 Context.SetExportContext(&ExportContext);
83}
84
86{
87 Context.SetExportContext(OldExportContext);
88}
89
90
91}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition ResizableCircularQueue.h:21
Definition NetSerializationContext.h:31
void SetExportContext(Private::FNetExportContext *InExportContext)
Definition NetSerializationContext.h:100
Definition NetExportContext.h:17
~FExportScope()
Definition NetExports.h:85
Definition NetExports.h:17
void CommitExportsToRecord(FExportScope &ExportScope)
Definition NetExports.cpp:15
void AcknowledgeBatchExports(const FNetExportContext::FBatchExports &BatchExports)
Definition NetExports.cpp:36
void InitExportRecordForPacket()
Definition NetExports.cpp:9
void ProcessPacketDeliveryStatus(UE::Net::EPacketDeliveryStatus Status)
Definition NetExports.cpp:52
void PushExportRecordForPacket()
Definition NetExports.cpp:28
FExportScope MakeExportScope(UE::Net::FNetSerializationContext &Context, FNetExportContext::FBatchExports &BatchExports)
Definition NetExports.h:53
Definition NetworkVersion.cpp:28
Definition NetworkVersion.cpp:28
EPacketDeliveryStatus
Definition PacketNotification.h:12