Table of Contents

Class ProtocolConstants

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

Values fixed by the protocol major, which a client needs before it has received any catalog (03-wire-protocol § 2, decision W22).

public static class ProtocolConstants
Inheritance
ProtocolConstants
Inherited Members

Fields

BuiltInMetricPrefix

The name prefix reserved for built-in metrics.

public const string BuiltInMetricPrefix = "typhon."

Field Value

string

FirstAppCommandIdx

Command indices below this are reserved for built-in commands; application commands start here.

public const int FirstAppCommandIdx = 16

Field Value

int

FirstAppEventIdx

Event indices below this are reserved for built-in events; application events start here.

public const int FirstAppEventIdx = 16

Field Value

int

FirstAppMetricIdx

Metric indices below this are reserved for built-in metrics; application metrics start here.

public const int FirstAppMetricIdx = 32

Field Value

int

HelloMaxBytes

Largest HELLO message, in bytes: the first message's own limit, before limits.clientMessageBytes applies.

public const int HelloMaxBytes = 16384

Field Value

int

HelloPayloadMaxBytes

Largest application payload a HELLO may carry, in bytes.

public const int HelloPayloadMaxBytes = 256

Field Value

int

HelloTimeoutMs

How long a server waits for HELLO before closing with HelloTimeout, in milliseconds.

public const int HelloTimeoutMs = 5000

Field Value

int

KickReasonMaxBytes

Largest KICK reason, in UTF-8 bytes: a WebSocket close frame's own limit (RFC 6455 § 5.5).

public const int KickReasonMaxBytes = 123

Field Value

int

Major

The protocol major this library speaks. The WebSocket subprotocol is typhon.2; the TCP preamble is TcpPreamble.

public const ushort Major = 2

Field Value

ushort

MaxArchetypes

At most this many archetypes: an SDK limit (the TypeScript store packs the archetype into 8 bits of a handle), not a wire limit.

public const int MaxArchetypes = 255

Field Value

int

MaxGroups

At most this many change groups per archetype, public or owner: the width of a record's u8 group mask.

public const int MaxGroups = 8

Field Value

int

MaxListCount

The largest element count a list codec may declare.

public const int MaxListCount = 255

Field Value

int

MaxPackedBits

The widest bits field: a shift of at most 7 plus the width fits one 32-bit read.

public const int MaxPackedBits = 24

Field Value

int

Minor

The protocol minor this library speaks. The lower minor of the two sides wins.

public const ushort Minor = 0

Field Value

ushort

SessionKindMaxBytes

Largest session kind name, in UTF-8 bytes.

public const int SessionKindMaxBytes = 32

Field Value

int

TokenMaxBytes

Largest HELLO token, in UTF-8 bytes.

public const int TokenMaxBytes = 8192

Field Value

int

WebSocketSubprotocol

The WebSocket subprotocol name for Major.

public const string WebSocketSubprotocol = "typhon.2"

Field Value

string

WelcomeMaxBytes

Largest WELCOME a client reads: the one inbound message it cannot bound with limits.frameBytes, because those limits arrive inside it (03 § 10).

public const int WelcomeMaxBytes = 1048576

Field Value

int

Properties

TcpPreamble

The 4-byte TCP preamble, ASCII TYP2: each side writes its own; a mismatch closes the connection without a KICK (W31).

public static ReadOnlySpan<byte> TcpPreamble { get; }

Property Value

ReadOnlySpan<byte>