Skip to content

Commit 573154c

Browse files
committed
ktor module: Update Ktor to version 3.1.3
1 parent eb06422 commit 573154c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
val GROUP = "io.github.likespro" // Until normal group ID - eth.likespro.commons
10-
val VERSION = "1.0.0"
10+
val VERSION = "1.1.0"
1111
val NAME = "LPFCP Java"
1212
val DESCRIPTION = "LPFCP protocol implementation in Java/Kotlin"
1313
val URL = "https://github.com/likespro/lpfcp-java"

ktor/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
2-
implementation("io.ktor:ktor-server-netty:2.3.7")
3-
implementation("io.ktor:ktor-server-core:2.3.7")
2+
implementation("io.ktor:ktor-server-netty:3.1.3")
3+
implementation("io.ktor:ktor-server-core:3.1.3")
44

55
implementation("org.json:json:20250107")
66

ktor/src/main/java/eth/likespro/lpfcp/ktor/Ktor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ object Ktor {
2525
*
2626
* @property engine The Netty application engine instance used to handle server operations.
2727
*/
28-
class LPFCPServer(val engine: NettyApplicationEngine) {
28+
class LPFCPServer(val embeddedServer: EmbeddedServer<NettyApplicationEngine, NettyApplicationEngine.Configuration>) {
2929
/**
3030
* Starts the Netty application engine.
3131
*
3232
* @param wait Specifies whether to block the current thread until the engine stops. Defaults to true.
3333
* @return The instance of the started NettyApplicationEngine.
3434
*/
35-
fun start(wait: Boolean): LPFCPServer = this.apply { engine.start(wait) }
35+
fun start(wait: Boolean): LPFCPServer = this.apply { embeddedServer.engine.start(wait) }
3636

3737
/**
3838
* Stops the Netty application engine with the specified grace period and timeout.
3939
*
4040
* @param gracePeriodMillis The time in milliseconds to wait for ongoing requests to complete before forcefully stopping. Defaults to 500 milliseconds.
4141
* @param timeoutMillis The maximum time in milliseconds to wait for the engine to stop. Defaults to 1500 milliseconds.
4242
*/
43-
fun stop(gracePeriodMillis: Long = 500, timeoutMillis: Long = 1500) = engine.stop(gracePeriodMillis, timeoutMillis)
43+
fun stop(gracePeriodMillis: Long = 500, timeoutMillis: Long = 1500) = embeddedServer.engine.stop(gracePeriodMillis, timeoutMillis)
4444
}
4545

4646
/**

0 commit comments

Comments
 (0)