ServerRequestScope

class ServerRequestScope : CoroutineScope(source)

Represents a request scope.

Report a problem

Properties

Link copied to clipboard
Link copied to clipboard
val input: ByteReadChannel

channel connected to request body bytes stream

Link copied to clipboard
val localAddress: NetworkAddress?

on which the client was accepted (if known)

Link copied to clipboard
val output: ByteWriteChannel

channel connected to response body

Link copied to clipboard
val remoteAddress: NetworkAddress?

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 an 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

Start an http server with settings invoking handler for every request

Link copied to clipboard

Creates another request scope with same parameters except coroutine context