object Companion
source · line 18public
public companion
Starts a session while transferring an established transport into a supplied coroutine scope.
function takeOwnership
source · line 24public
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.
parameter role
source · line 27public
role: HttpRole
parameter deflate
source · line 29public
deflate: WebSocketDeflateNegotiation? = None
parameter scope
source · line 26public
scope: CoroutineScope
type parameter T
source · line 24public
T
parameter transport
source · line 25public
transport: T
parameter options
source · line 28public
options: WebSocketSessionOptions = webSocketSessionOptions()