write

fun WritableByteChannel.write(buffer: IoBuffer): Int

Write bytes to a NIO channel from the specified buffer Could return 0 if the channel is non-blocking or buffer has no free space

Return

number of bytes written (possibly 0)