writeShort

fun writeShort(s: Int)

Buffers an unsigned 16-bit integer, most significant byte first - taken as an Int because the protocol's counts run to 65535 and a Short would make half of them negative.