Scoop API

scoop:scoop.http.asyncio:0.1.0

Companion

object Companion

source · line 34
public
public companion

Factories that transfer an established transport to structured protocol tasks.

function takeOwnershipAsUpgradedClient

source · line 61
public
public suspend fun <T> takeOwnershipAsUpgradedClient(transport: T, scope: CoroutineScope, requestMethod: List<Byte>, settings: Http2Settings = Http2Settings(), options: Http2ReceiveOptions = Http2ReceiveOptions(), limits: Http2Limits = Http2Limits(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions(), onEvent: (Http2Notice) -> Unit = { _ -> }, captureTimings: Boolean = false): AsyncHttp2Connection where T : AsyncByteStream, T : AsyncCloseable

Takes transport ownership after a completed HTTP/1 h2c switch, preserving stream 1 and using the actual upgrade SETTINGS. New client streams begin at 3.

function takeOwnershipAsClient

source · line 39
public
public suspend fun <T> takeOwnershipAsClient(transport: T, scope: CoroutineScope, options: Http2ReceiveOptions = Http2ReceiveOptions(), limits: Http2Limits = Http2Limits(), settings: Http2Settings = Http2Settings(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions(), onEvent: (Http2Notice) -> Unit = { _ -> }, captureTimings: Boolean = false): AsyncHttp2Connection where T : AsyncByteStream, T : AsyncCloseable

Takes an already-established transport as an HTTP client. The supplied scope owns connection tasks; TCP connection and TLS handshake must already be complete.

function takeOwnershipAsUpgradedServer

source · line 73
public
public suspend fun <T> takeOwnershipAsUpgradedServer(transport: T, scope: CoroutineScope, requestMethod: List<Byte>, settingsPayload: List<Byte>, options: Http2ReceiveOptions = Http2ReceiveOptions(), limits: Http2Limits = Http2Limits(), settings: Http2Settings = Http2Settings(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions(), onEvent: (Http2Notice) -> Unit = { _ -> }): AsyncHttp2Connection where T : AsyncByteStream, T : AsyncCloseable

Takes transport ownership after a completed HTTP/1 h2c switch, preserving stream 1 and using the actual upgrade SETTINGS. New client streams begin at 3.

function takeOwnershipAsServer

source · line 50
public
public suspend fun <T> takeOwnershipAsServer(transport: T, scope: CoroutineScope, options: Http2ReceiveOptions = Http2ReceiveOptions(), limits: Http2Limits = Http2Limits(), settings: Http2Settings = Http2Settings(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions(), onEvent: (Http2Notice) -> Unit = { _ -> }): AsyncHttp2Connection where T : AsyncByteStream, T : AsyncCloseable

Takes an already-established transport as an HTTP server. The supplied scope owns connection tasks; TCP connection and TLS handshake must already be complete.