Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · class

Native::

FNetBatchReader

Experimental

Reads the batches of one stream that FNetBatchWriter wrote, in order.

Declaration

class FNetBatchReader
Header
#include "Native/Net/NetBatch.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

Atomic. Open checks the whole batch, every payload included (CheckNetPayload), before any record is handed out: a malformed batch is refused with a status and leaves the stream as it was, so a caller never applies half a batch. Next then hands out the records; it cannot fail.

Tier 1. One thread at a time. Allocation-free, except that Open allocates to check a SculptPatch's or a Repair's tiles.

Functions

  • Reset

    Forget the stream; the next batch must be Fresh.

  • SetRequests

    Read a client's request stream (the server's reader), which also takes the request-only kinds checked by CheckNetRequestPayload, or a record stream (the default), which refuses them as UnknownKind.

  • Open

    Check a batch and make it the one Next reads.

  • Next

    The next record of the opened batch.

  • Count

    Records in the opened batch.

  • FirstSeq

    Its header's FirstSeq.

  • Fresh

    Whether it started a new stream.

  • NextSeq

    The next sequenced record's number after the opened batch.