jkbbwr
04/26/2018, 12:33 PMclass Peer(val socket: AsynchronousSocketChannel): SendChannel<ByteArray> by sender {
val sender = actor<ByteArray> {
for (payload in channel) {
socket.asyncWrite(ByteBuffer.wrap(payload))
}
}