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 String field whose byte length is determined by a preceding numeric field. The referenced field must exist, come before this field, and be a numeric type.
Length prefix encoding for LengthPrefixed fields. All variants use big-endian (network) byte order.
Marks a String or payload field as length-prefixed: prefix bytes followed by UTF-8 data. Default is 2-byte big-endian (UShort) prefix.
Specifies the discriminator value for a variant of a @ProtocolMessage sealed interface.
Marks a type parameter as the application payload. The generated codec will provide a scoped PayloadReader for decoding.
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 String field to consume all remaining bytes as UTF-8. Must be the last non-conditional field in the constructor.
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).