Table of Contents

Class CommandsMessage

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

COMMANDS (0x83): u32 clientTick | varu count ≥ 1 | (varu cmdTypeIdx | u16 seq | fields)*, the client's batch for one rendered frame.

public static class CommandsMessage
Inheritance
CommandsMessage
Inherited Members

Remarks

Validated whole before anything is delivered (03-wire-protocol § 8: known type → length consumed exactly → decode). The message is decoded once into a checking sink — every type known, every enum value within its names (W13), not a byte left over — and only then decoded again into the caller's sink, so a malformed tail can never deliver the valid commands in front of it. Commands are small and rate-limited; decoding twice costs nothing measurable.

Methods

Read<TSink>(ReadOnlySpan<byte>, CatalogPlan, ref TSink)

Validates, then decodes, a whole COMMANDS message, type byte included.

public static void Read<TSink>(ReadOnlySpan<byte> message, CatalogPlan plan, ref TSink sink) where TSink : ICommandSink, allows ref struct

Parameters

message ReadOnlySpan<byte>

The message.

plan CatalogPlan

The session's compiled catalog.

sink TSink

Receives the commands, only once the whole message has been validated.

Type Parameters

TSink

The sink type.

Exceptions

WireFormatException

The message is malformed; nothing reached sink.

Write(ref WireWriter, uint, IReadOnlyList<(MessagePlan Type, ushort Seq, RecordValues Values)>)

Writes a COMMANDS message, type byte included.

public static void Write(ref WireWriter w, uint clientTick, IReadOnlyList<(MessagePlan Type, ushort Seq, RecordValues Values)> commands)

Parameters

w WireWriter

The writer.

clientTick uint

The client's tick for the batch.

commands IReadOnlyList<(MessagePlan Type, ushort Seq, RecordValues Values)>

At least one command: its type, sequence and field values.