File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/main/java/eth/likespro/lpfcp/ktor Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 77 */
88
99val GROUP = " io.github.likespro" // Until normal group ID - eth.likespro.commons
10- val VERSION = " 1.0 .0"
10+ val VERSION = " 1.1 .0"
1111val NAME = " LPFCP Java"
1212val DESCRIPTION = " LPFCP protocol implementation in Java/Kotlin"
1313val URL = " https://github.com/likespro/lpfcp-java"
Original file line number Diff line number Diff line change 11dependencies {
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
Original file line number Diff line number Diff 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 /* *
You can’t perform that action at this time.
0 commit comments