after
Parameters
after
Names a sibling constructor field that the prefix sits immediately after on the wire. Empty (default) means the prefix is at offset 0. The named field must exist, have Exact wire width, and — when the class carries @PacketType — be the discriminator.
@ProtocolMessage
@FramedBy(MqttRemainingLengthCodec::class, after = "header")
sealed interface MqttPacket {
// Each variant declares its own header field; the framework writes
// the prefix between header and body, computed from body bytes.
}Content copied to clipboard