Extensions for io.netty.util.concurrent.Future

suspendAwait

suspend fun <T> Future<T>.suspendAwait(): T

Suspend until the future completion. Resumes with the same exception if the future completes exceptionally

suspend fun <T> Future<T>.suspendAwait(
    exception: (Throwable, <ERROR CLASS><T>) -> Unit
): T

Suspend until the future completion handling exception from the future using exception function

suspendWriteAwait

suspend fun <T> Future<T>.suspendWriteAwait(): T

Suspend until the future completion. Wraps futures completion exceptions into ChannelWriteException