Package-level declarations

Types

Link copied to clipboard
class ServerIncomingConnection(val input: ByteReadChannel, val output: ByteWriteChannel, val remoteAddress: NetworkAddress?, val localAddress: NetworkAddress?)

Represents a server incoming connection. Usually it is a TCP connection but potentially could be other transport.

Link copied to clipboard
class ServerRequestScope : CoroutineScope

Represents a request scope.

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