write

suspend fun write(value: T)

Encode value through the codec, frame the bytes, and write the framed packet on the underlying channel.

Throws

if the encoded payload exceeds the framer's maxFrameSize. No bytes are written in that case.