Class ProtocolConstants
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
FirstAppCommandIdx
Command indices below this are reserved for built-in commands; application commands start here.
public const int FirstAppCommandIdx = 16
Field Value
FirstAppEventIdx
Event indices below this are reserved for built-in events; application events start here.
public const int FirstAppEventIdx = 16
Field Value
FirstAppMetricIdx
Metric indices below this are reserved for built-in metrics; application metrics start here.
public const int FirstAppMetricIdx = 32
Field Value
HelloMaxBytes
Largest HELLO message, in bytes: the first message's own limit, before limits.clientMessageBytes applies.
public const int HelloMaxBytes = 16384
Field Value
HelloPayloadMaxBytes
Largest application payload a HELLO may carry, in bytes.
public const int HelloPayloadMaxBytes = 256
Field Value
HelloTimeoutMs
How long a server waits for HELLO before closing with HelloTimeout, in milliseconds.
public const int HelloTimeoutMs = 5000
Field Value
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
Major
The protocol major this library speaks. The WebSocket subprotocol is typhon.3; the TCP preamble is TcpPreamble.
public const ushort Major = 3
Field Value
Remarks
Major 3 (Realms, decision D-4): the velocity unit became absolute and positions realm-framed — an old client would decode them with
the wrong unit or bounds, silently, so the break is refused at the upgrade / preamble rather than after WELCOME.
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
MaxCollCount
The largest maxCount a coll may declare (W34). The bytes it can reach are bounded again by the frame: a wide section's worst case is at
most a quarter of limits.frameBytes.
public const int MaxCollCount = 65535
Field Value
MaxCount
The most values one count field carries (W33): a 4 × 4 matrix, the widest fixed shape worth one field.
public const int MaxCount = 16
Field Value
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
MaxListCount
The largest element count a list codec may declare.
public const int MaxListCount = 255
Field Value
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
MaxRealmKinds
The most realm kinds a catalog declares: a REALM block's varu kindIdx stays one byte.
public const int MaxRealmKinds = 128
Field Value
MaxVelocityUnitExp
Largest velocity unit exponent a catalog may declare: 2^16 m per tick.
public const int MaxVelocityUnitExp = 16
Field Value
MinVelocityUnitExp
Smallest velocity unit exponent a catalog may declare: 2^-40 m per tick, far below any float32 position jitter.
public const int MinVelocityUnitExp = -40
Field Value
Minor
The protocol minor this library speaks. The lower minor of the two sides wins.
public const ushort Minor = 0
Field Value
SessionKindMaxBytes
Largest session kind name, in UTF-8 bytes.
public const int SessionKindMaxBytes = 32
Field Value
ShapeMaxBytes
The longest shape hint, in UTF-8 bytes (W33): every defined one is under ten.
public const int ShapeMaxBytes = 32
Field Value
TokenMaxBytes
Largest HELLO token, in UTF-8 bytes.
public const int TokenMaxBytes = 8192
Field Value
WebSocketSubprotocol
The WebSocket subprotocol name for Major.
public const string WebSocketSubprotocol = "typhon.3"
Field Value
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
Properties
TcpPreamble
The 4-byte TCP preamble, ASCII TYP3: each side writes its own; a mismatch closes the connection without a KICK (W31).
public static ReadOnlySpan<byte> TcpPreamble { get; }