Scoop API

scoop:scoop.http.asyncio:0.1.0

Companion

object Companion

source · line 18
public
public companion

Starts a session while transferring an established transport into a supplied coroutine scope.

function takeOwnership

source · line 24
public
public suspend fun <T> takeOwnership(transport: T, scope: CoroutineScope, role: HttpRole, options: WebSocketSessionOptions = webSocketSessionOptions(), deflate: WebSocketDeflateNegotiation? = None): AsyncWebSocketSession where T: AsyncByteStream, T: AsyncCloseable

Takes an already-upgraded transport with its role and actual compression negotiation. Invalid initial options leave ownership with the caller; failures after takeover clean up the transport.