All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmAndPosixMain.io.ktor.server.cio.CIO.kt Maven / Gradle / Ivy

Go to download

Ktor is a framework for quickly creating web applications in Kotlin with minimal effort.

The newest version!
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package io.ktor.server.cio

import io.ktor.events.*
import io.ktor.server.application.*
import io.ktor.server.engine.*

/**
 * An [ApplicationEngineFactory] providing a CIO-based [ApplicationEngine]
 */
public object CIO : ApplicationEngineFactory {

    override fun configuration(
        configure: CIOApplicationEngine.Configuration.() -> Unit
    ): CIOApplicationEngine.Configuration {
        return CIOApplicationEngine.Configuration().apply(configure)
    }

    override fun create(
        environment: ApplicationEnvironment,
        monitor: Events,
        developmentMode: Boolean,
        configuration: CIOApplicationEngine.Configuration,
        applicationProvider: () -> Application
    ): CIOApplicationEngine {
        return CIOApplicationEngine(environment, monitor, developmentMode, configuration, applicationProvider)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy