Package-level declarations

Types

Link copied to clipboard

Engine that based on CIO backend

Link copied to clipboard
object EngineMain

Default engine with main function that starts CIO engine using application.conf

Link copied to clipboard
typealias HttpRequestHandler = suspend ServerRequestScope.(request: Request) -> Unit

HTTP request handler function

Link copied to clipboard
class HttpServer(val rootServerJob: Job, val acceptJob: Job, val serverSocket: Deferred<ServerSocket>)

Represents a server instance

Link copied to clipboard
data class HttpServerSettings(val host: String = "0.0.0.0", val port: Int = 8080, val connectionIdleTimeoutSeconds: Long = 45)

HTTP server connector settings

Functions

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

Properties

Link copied to clipboard
val HttpPipelineCoroutine: CoroutineName

HTTP pipeline coroutine name

Link copied to clipboard
val HttpPipelineWriterCoroutine: CoroutineName

HTTP pipeline writer coroutine name

Link copied to clipboard
val RequestHandlerCoroutine: CoroutineName

HTTP request handler coroutine name