Table of Contents

Class TickReader

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

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

message ReadOnlySpan<byte>

The whole message.

plan CatalogPlan

The session's compiled catalog.

frame RealmFrame

The session's realm frame, held across messages by the caller: every positioned value decodes over it, and a REALM block replaces it (SUB-30).

sink TSink

Receives the frame.

blocks TickBlocks

Which blocks reach the sink; the others are skipped by their length, unread. A store reads a frame twice — every block but EVENTS, then EVENTS alone — to apply § 5's order whatever order the blocks travel in.

Type Parameters

TSink

The 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

message ReadOnlySpan<byte>

The whole message.

plan CatalogPlan

The compiled catalog.

sink TSink

Receives the frame.

blocks TickBlocks

Which blocks reach the sink.

Type Parameters

TSink

The sink type.

Exceptions

WireFormatException

The message is malformed.