Orrery Terrain · OrreryTerrainCore module · class
Native::
FTerrainNetLog
ExperimentalThe authority's ordered log of one terrain's net records.
Declaration
class FTerrainNetLog- Header
#include "Native/Net/NetLog.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainCore");in your module’s Build.cs.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
- Thread
- Game thread only (the net hub's), like every FTerrainWorld write.
Description
Every record the authority validated and applied is appended and gets the next sequence number, from FirstSeq up without gaps; every replica applies them in that order. Each link (and each open join) holds a cursor at the last record it applied; Trim drops what every cursor has applied, so the log holds only what some link still needs. With no cursor it holds nothing after a Trim.
Payloads are checked on Append (CheckNetPayload): a malformed record never gets a number. A Repair is per client and never enters the log.
Tier 1, GC-free. Game thread only (the net hub's), like every FTerrainWorld write. Appends and trims reuse their buffers: amortised allocation-free once warm.
Functions
- FTerrainNetLog
An empty log whose first record gets FirstSeq (0 is taken as 1).
- Append
Append one record the authority applied.
- AppendSculpt
Append one sculpt command, as Append with its kSculptCommandBytes.
- Get
The record at Seq.
- NextSeq
The number the next Append gets.
- OldestSeq
The oldest record held; NextSeq when the log is empty.
- Records
Records held.
- HeldBytes
Their payload bytes.
- AddCursor
Add a cursor for a link or a join that has applied every record up to AppliedSeq.
- AdvanceCursor
Move a cursor forward to AppliedSeq (a link's ack).
- RemoveCursor
Drop a cursor (a link closed, a join finished into a live cursor).
- CursorSeq
The last record a cursor applied.
- LagBytes
Bytes held behind a cursor: payloads plus kNetRecordHeaderBytes per record.
- TakeLagging
Remove every cursor more than
FNetLogLimits::MaxLagBytesbehind and list it in Out, in the order the cursors were added; their links rejoin from a snapshot. - Trim
Drop every record all cursors have applied (all records when there is no cursor).