Package-level declarations
Types
Specifies a custom discriminator type for a @ProtocolMessage sealed interface.
Marks a property as the dispatch value within a @DispatchOn discriminator type.
Wire byte order for ProtocolMessage.wireOrder and WireOrder.
Marks a @ProtocolMessage class (typically a sealed parent) with a framing length prefix that is computed from — and bounds — the body's wire size.
Marks a field whose byte length is determined by a numeric sibling elsewhere in the message — the length is carried as a separate constructor parameter because the consumer cares about it as a number (flow control, routing) or because the on-wire prefix shape is one @LengthPrefixed cannot express (e.g. TLS uint24).
Length prefix encoding for LengthPrefixed fields. All variants use big-endian (network) byte order.
Marks a length-prefixed field: prefix bytes carrying the value's wire size, followed by the value's bytes. Default prefix width is 2-byte big-endian (UShort).
Specifies the discriminator value for a variant of a @ProtocolMessage sealed interface.
Marks a data class or sealed interface as a protocol message. KSP will generate a Codec implementation for this type at compile time.
Marks a field that consumes the remaining bytes of the bounded buffer.
Conditional field: only present on the wire when the predicate holds. The field must be nullable. Setting = null as the constructor default is conventional (so the data class can be constructed without naming the field when the predicate is false) but is not enforced — KSP cannot inspect default expression trees, so any rule the validator can't actually check is not part of the contract.
Overrides the byte order for a single field, taking precedence over ProtocolMessage.wireOrder. Use when a protocol mixes byte orders within a single message (e.g., big-endian magic + little-endian lengths).