Scoop API

scoop:scoop.http.asyncio:0.1.0

Companion

object Companion

source · line 52
public
public companion

Factories that transfer an established transport to structured protocol tasks.

function takeOwnershipAsClient

source · line 57
public
public suspend fun <T> takeOwnershipAsClient(transport: T, scope: CoroutineScope, options: Http1ReceiveOptions = Http1ReceiveOptions(), limits: Http1Limits = Http1Limits(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions(), captureTimings: Boolean = false): AsyncHttp1Connection 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 takeOwnershipAsServer

source · line 81
public
public suspend fun <T> takeOwnershipAsServer(transport: T, scope: CoroutineScope, options: Http1ReceiveOptions = Http1ReceiveOptions(), limits: Http1Limits = Http1Limits(), ioTimeouts: HttpIoTimeoutOptions = HttpIoTimeoutOptions()): AsyncHttp1Connection 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.