vertx / io.vertx.kotlin.core.net / io.vertx.core.net.NetSocket

Extensions for io.vertx.core.net.NetSocket

sendFileAwait

suspend fun NetSocket.sendFileAwait(filename: String): Unit
suspend fun NetSocket.sendFileAwait(filename: String, offset: Long): Unit
suspend fun NetSocket.sendFileAwait(filename: String, offset: Long, length: Long): Unit

Same as io.vertx.core.net.NetSocket but also takes a handler that will be called when the send has completed or a failure has occurred

writeAwait

suspend fun NetSocket.writeAwait(message: Buffer): Unit

Like but with an handler called when the message has been written or failed to be written.