ServerRequestScope

class ServerRequestScope : CoroutineScope

Represents a request scope.

Properties

Link copied to clipboard
Link copied to clipboard

channel connected to request body bytes stream

Link copied to clipboard

on which the client was accepted (if known)

Link copied to clipboard

channel connected to response body

Link copied to clipboard

of the client (if known)

Link copied to clipboard
val upgraded: CompletableDeferred<Boolean>?

deferred should be completed on upgrade request

Functions

Link copied to clipboard
fun CoroutineScope.httpServer(settings: HttpServerSettings, handler: HttpRequestHandler): HttpServer

Start a http server with settings invoking handler for every request

Link copied to clipboard
fun CoroutineScope.startServerConnectionPipeline(connection: ServerIncomingConnection, timeout: Duration, handler: HttpRequestHandler): Job

Start connection HTTP pipeline invoking handler for every request. Note that handler could be invoked multiple times concurrently due to HTTP pipeline nature

Link copied to clipboard

Creates another request scope with same parameters except coroutine context