fun <T> WriteStream<T>.toChannel(vertx: Vertx, capacity: Int = 256): SendChannel<T>
Adapts the current write stream to Kotlin SendChannel.
The channel can be used to write items, the coroutine is suspended when the stream is full and resumed when the stream is drained.
vertx - the related vertx instance
capacity - the channel buffering capacity
fun <T> WriteStream<T>.toChannel(context: Context, capacity: Int = 256): SendChannel<T>
Adapts the current write stream to Kotlin SendChannel.
The channel can be used to write items, the coroutine is suspended when the stream is full and resumed when the stream is drained.