Scoop API

scoop:scoop.http.server:0.1.0

Companion

object Companion

source · line 10
public
public companion

Explicit listener-ownership construction.

function listen

source · line 12
public
public suspend fun listen(application: HttpApplication, scope: CoroutineScope, port: Int = 8080, host: IpAddress = IpAddress.IPV4_LOOPBACK, options: HttpServerOptions = httpServerOptions()): HttpServer

Binds on the current event loop and starts this application in the supplied scope.

function listen

source · line 35
public
public suspend fun listen(scope: CoroutineScope, port: Int = 8080, host: IpAddress = IpAddress.IPV4_LOOPBACK, options: HttpServerOptions = httpServerOptions(), applicationOptions: HttpApplicationOptions = httpApplicationOptions(), configure: RouterBuilder.() -> Unit): HttpServer

Configures and freezes routes before binding, using the same server and lifecycle.

function takeOwnership

source · line 52
public
public suspend fun takeOwnership(listener: AsyncTcpListener, application: HttpApplication, scope: CoroutineScope, options: HttpServerOptions = httpServerOptions()): HttpServer

Takes the listener after registering the server owner in the supplied active scope.