Orrery Terrain · OrreryTerrainCore module · function
Native::
CheckNetPayload
ExperimentalCheck a payload against its kind, touching nothing.
Declaration
ENetDecode CheckNetPayload(ETerrainNetRecordKind Kind, const uint8_t* Payload, size_t Size, FSculptCommand* OutCommand = nullptr);- 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.
- Thread
- Pure, any thread.
Description
Sculpt: exactly kSculptCommandBytes of record version kSculptRecordVersion that DecodeSculptCommand accepts (the net never carries version 2; the Hello refuses such a peer). SculptPatch: version kSculptRecordVersion and DecodeSculptPatch accepts it. BrushMask: DecodeBrushMaskRecord accepts it, without building the mask. The others: their decoders accept them.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Kind | ETerrain | — | The record kind the payload claims. |
Payload | const uint8_ | — | The payload bytes. |
Size | size_ | — | The payload's size in bytes. |
OutCommand | FSculpt | nullptr | Optional: the decoded command of a Sculpt payload. |
Returns
Ok, or the first rule the payload breaks.
Note.
Pure, any thread. Allocates only to check a SculptPatch's or a Repair's tiles, or a BrushMask's bytes.