ServerRequestScope

class ServerRequestScope : CoroutineScope

Represents a request scope.

Functions

Link copied to clipboard

Creates another request scope with same parameters except coroutine context

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

Extensions

Link copied to clipboard
fun CoroutineScope.httpServer(settings: HttpServerSettings, handler: suspend CoroutineScope.(request: Request, input: ByteReadChannel, output: ByteWriteChannel, upgraded: CompletableDeferred<Boolean>?) -> Unit): HttpServer

Start an http server with settings invoking handler for every request

fun CoroutineScope.httpServer(settings: HttpServerSettings, handler: HttpRequestHandler): HttpServer

Start an http server with settings invoking handler for every request

Link copied to clipboard
fun CoroutineScope.startServerConnectionPipeline(connection: ServerIncomingConnection, timeout: WeakTimeoutQueue, 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