Scoop API

scoop:scoop.http.server:0.1.0

HttpServer

class HttpServer

source · line 8
public
public class HttpServer private constructor(private val state: ServerState) : AsyncCloseable

Owns an accept loop, its connections and their structured request tasks.

function close

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

Cancels owned work immediately and waits for actual local cleanup.

function awaitTermination

source · line 104
public
public suspend fun awaitTermination(): Unit

Waits without initiating shutdown, then reports any server-owner failure.

function shutdownGracefully

source · line 111
public
public suspend fun shutdownGracefully(): Unit

Stops accepting and drains using the configured natural-drain period.

property localAddress

source · line 95
public
public val localAddress: SocketAddress

get: public read-only

The bound address snapshot, including an OS-selected port; remains available after closing.