Package io.ktor.server.cio

Types

Link copied to clipboard
Link copied to clipboard

Engine that based on CIO backend

Link copied to clipboard
object DevelopmentEngine
Link copied to clipboard
object EngineMain

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

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

Represents a server instance

Link copied to clipboard
data class HttpServerSettings(host: String, port: Int, connectionIdleTimeoutSeconds: Long)

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

fun httpServer(settings: HttpServerSettings, parentJob: Job? = null, handler: HttpRequestHandler): HttpServer
fun httpServer(settings: HttpServerSettings, parentJob: Job? = null, callDispatcher: CoroutineContext?, handler: HttpRequestHandler): HttpServer