Scoop API

scoop:scoop.http.asyncio:0.1.0

AsyncHttp2Connection

class AsyncHttp2Connection

source · line 30
public
public class AsyncHttp2Connection internal constructor(internal val state: H2State) : AsyncCloseable

An owned multiplexed HTTP/2 connection driven by structured tasks in the supplied scope. Per-stream cancellation resets only that stream; connection or scope closure ends shared transport I/O.

function close

source · line 158
public
public override suspend fun close(): Unit

Cancels and joins shared connection I/O and closes the owned transport. This is local cleanup, distinct from explicitly sending GOAWAY.

function openRequest

source · line 115
public
public suspend fun openRequest(head: HttpRequestHead, endStream: Boolean = true, ioTimeouts: HttpIoTimeoutOptions = this.ioTimeouts): AsyncHttp2Stream

Submits a request and returns its stream. Set endStream false when an upload body or trailers will follow; draining connections reject before submission.

function acceptRequest

source · line 138
public
public suspend fun acceptRequest(): Http2IncomingRequest?

Waits for a server-side incoming request, or None after the connection stops accepting requests.