Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · struct

Native::

FNetMaskUpload

Experimental

One part of a client's brush mask upload (a MaskUpload request): the offer, or a chunk of the upload's bytes.

Declaration

struct FNetMaskUpload
Header
#include "Native/Net/NetRecord.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Experimental: supported, may change in a minor version, with a changelog line.

Description

The upload is one full BrushMask payload, as EncodeBrushMaskRecord writes it (hash, canonical size, codec, coded bytes), cut into chunks sent in order. The offer (no chunk) names the mask so the server can check its size, the player's quota and the game's policy before a byte travels; the server answers it with the bytes it already holds, so an upload broken by a rejoin resumes there. The server checks the hash once every byte arrived (FNetMaskUploadAssembly::Finish).

Payload layout, little-endian: U64 Hash (never 0), U32 CanonicalBytes (IsBrushMaskCanonicalSize), U32 TotalBytes (kNetBrushMaskHashOnlyBytes + 2 to CanonicalBytes + kNetBrushMaskHashOnlyBytes + 1), U32 Offset, then the chunk: the rest of the payload, at most kNetMaskUploadChunkBytes, Offset + its size at most TotalBytes. An empty chunk is the offer and has Offset 0. Tier 1, plain data; Chunk is borrowed.

Functions

Properties

NameTypeDefaultMeaning
Hashuint64_t0—
CanonicalBytesuint32_t0

The mask's canonical size (FBrushMask::Encode): its side and bits follow from it.

TotalBytesuint32_t0

The whole upload: the size of the mask's full BrushMask payload.

Offsetuint32_t0

Where Chunk starts in the upload.

Chunkconst uint8_t*nullptr

The chunk's bytes, borrowed from the payload or the sender's upload.

ChunkBytessize_t0

0 for the offer.