Extensions for kotlinx.coroutines.CoroutineScope

mapEngineExceptions

fun CoroutineScope.mapEngineExceptions(
    input: ByteReadChannel,
    request: HttpRequestData
): ByteReadChannel

Returns ByteReadChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException.

fun CoroutineScope.mapEngineExceptions(
    input: ByteWriteChannel,
    request: HttpRequestData
): ByteWriteChannel

Returns ByteWriteChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException.