diff --git a/archive/build.gradle.kts b/archive/build.gradle.kts index f40f089253..d4d34a3288 100644 --- a/archive/build.gradle.kts +++ b/archive/build.gradle.kts @@ -34,6 +34,7 @@ dependencies { implementation(libs.jquery) implementation(libs.jsoup) implementation(libs.kotlin.coroutines.core) + implementation(libs.netty.handler) implementation(libs.postgres) } diff --git a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt index b9cf9f2e1e..271b2e6058 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt @@ -14,8 +14,8 @@ import io.ktor.response.respond import io.ktor.response.respondRedirect import io.ktor.routing.get import io.ktor.routing.routing +import io.ktor.server.cio.CIO import io.ktor.server.engine.embeddedServer -import io.ktor.server.netty.Netty import io.ktor.thymeleaf.Thymeleaf import io.ktor.thymeleaf.ThymeleafContent import io.ktor.webjars.Webjars @@ -33,7 +33,7 @@ public class WebServer @Inject constructor( @Json private val mapper: ObjectMapper ) { public fun start(address: String, port: Int) { - embeddedServer(Netty, host = address, port = port) { + embeddedServer(CIO, host = address, port = port) { install(ContentNegotiation) { register(ContentType.Application.Json, JacksonConverter(mapper)) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 506a379cf5..f2b9a62cf4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,13 +46,14 @@ kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-co kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinCoroutines" } kotlinPoet = { module = "com.squareup:kotlinpoet", version = "1.9.0" } ktor-jackson = { module = "io.ktor:ktor-jackson", version.ref = "ktor" } -ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor" } +ktor-server-cio = { module = "io.ktor:ktor-server-cio", version.ref = "ktor" } ktor-thymeleaf = { module = "io.ktor:ktor-thymeleaf", version.ref = "ktor" } ktor-webjars = { module = "io.ktor:ktor-webjars", version.ref = "ktor" } logback = { module = "ch.qos.logback:logback-classic", version = "1.2.5" } netty-buffer = { module = "io.netty:netty-buffer", version.ref = "netty" } netty-codec-core = { module = "io.netty:netty-codec", version.ref = "netty" } netty-codec-http = { module = "io.netty:netty-codec-http", version.ref = "netty" } +netty-handler = { module = "io.netty:netty-handler", version.ref = "netty" } netty-transport = { module = "io.netty:netty-transport", version.ref = "netty" } openrs2-natives = { module = "org.openrs2:openrs2-natives-all", version = "3.2.0" } postgres = { module = "org.postgresql:postgresql", version = "42.2.23" } @@ -63,5 +64,5 @@ xz = { module = "org.tukaani:xz", version = "1.9" } [bundles] asm = ["asm-core", "asm-commons", "asm-tree", "asm-util"] bouncyCastle = ["bouncyCastle-pkix", "bouncyCastle-provider"] -ktor = ["ktor-jackson", "ktor-server-netty", "ktor-thymeleaf", "ktor-webjars"] +ktor = ["ktor-jackson", "ktor-server-cio", "ktor-thymeleaf", "ktor-webjars"] thymeleaf = ["thymeleaf-core", "thymeleaf-java8time"]