ktor-http / io.ktor.http.content / OutgoingContent / ProtocolUpgrade / upgrade

upgrade

abstract suspend fun upgrade(input: ByteReadChannel, output: ByteWriteChannel, engineContext: <ERROR CLASS>, userContext: <ERROR CLASS>): 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