Class TickReader
Decodes a TICK message into an ITickSink: the header, then every block, each isolated by its length so a block can neither read
past its end nor leave bytes unread.
public static class TickReader
- Inheritance
-
TickReader
- Inherited Members
Methods
Read<TSink>(ReadOnlySpan<byte>, CatalogPlan, ref RealmFrame, ref TSink, TickBlocks)
Decodes one TICK message, type byte included.
public static void Read<TSink>(ReadOnlySpan<byte> message, CatalogPlan plan, ref RealmFrame frame, ref TSink sink, TickBlocks blocks = TickBlocks.All) where TSink : ITickSink, allows ref struct
Parameters
messageReadOnlySpan<byte>The whole message.
planCatalogPlanThe session's compiled catalog.
frameRealmFrameThe session's realm frame, held across messages by the caller: every positioned value decodes over it, and a
REALMblock replaces it (SUB-30).sinkTSinkReceives the frame.
blocksTickBlocksWhich blocks reach the sink; the others are skipped by their length, unread. A store reads a frame twice — every block but
EVENTS, thenEVENTSalone — to apply § 5's order whatever order the blocks travel in.
Type Parameters
TSinkThe sink type; a struct keeps the calls inlined.
Exceptions
- WireFormatException
The message is malformed.
Read<TSink>(ReadOnlySpan<byte>, CatalogPlan, ref TSink, TickBlocks)
Decodes one self-contained TICK message: the session holds no realm frame before it, so any positioned value must follow a REALM block of
the same message. A session decoder keeps its frame across messages with the other overload.
public static void Read<TSink>(ReadOnlySpan<byte> message, CatalogPlan plan, ref TSink sink, TickBlocks blocks = TickBlocks.All) where TSink : ITickSink, allows ref struct
Parameters
messageReadOnlySpan<byte>The whole message.
planCatalogPlanThe compiled catalog.
sinkTSinkReceives the frame.
blocksTickBlocksWhich blocks reach the sink.
Type Parameters
TSinkThe sink type.
Exceptions
- WireFormatException
The message is malformed.