upgrade

abstract suspend fun upgrade(input: ByteReadChannel, output: ByteWriteChannel, engineContext: CoroutineContext, userContext: CoroutineContext): Job

Upgrades an HTTP connection

Parameters

input

is a ByteReadChannel for an upgraded connection

output

is a ByteWriteChannel for an upgraded connection

engineContext

is a CoroutineContext to execute non-blocking code, such as parsing or processing

userContext

is a CoroutineContext to execute user-provided callbacks or code potentially blocking