Skip to content

Commit 43cc2b7

Browse files
authored
Deprecate nodejs transport in favor of ktor (#287)
1 parent 8fd223d commit 43cc2b7

File tree

7 files changed

+8
-273
lines changed

7 files changed

+8
-273
lines changed

rsocket-transports/nodejs-tcp/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2024 the original author or authors.
2+
* Copyright 2015-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ plugins {
2020
id("rsocketbuild.multiplatform-library")
2121
}
2222

23-
description = "rsocket-kotlin NodeJS TCP client/server transport implementation"
23+
description = "[DEPRECATED] rsocket-kotlin NodeJS TCP client/server transport implementation"
2424

2525
kotlin {
2626
jsTarget(supportsBrowser = false)

rsocket-transports/nodejs-tcp/src/jsMain/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/NodejsTcpClientTransport.kt

Lines changed: 0 additions & 74 deletions
This file was deleted.

rsocket-transports/nodejs-tcp/src/jsMain/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/NodejsTcpConnection.kt

Lines changed: 0 additions & 75 deletions
This file was deleted.

rsocket-transports/nodejs-tcp/src/jsMain/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/NodejsTcpServerTransport.kt

Lines changed: 0 additions & 108 deletions
This file was deleted.

rsocket-transports/nodejs-tcp/src/jsMain/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/TcpClientTransport.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2024 the original author or authors.
2+
* Copyright 2015-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ import kotlinx.coroutines.*
2323
import kotlin.coroutines.*
2424

2525
@Suppress("DEPRECATION_ERROR")
26-
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of new Transport API, use NodejsTcpClientTransport")
26+
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of `rsocket-transport-ktor-tcp` with ktor 3.1")
2727
public class TcpClientTransport(
2828
private val port: Int,
2929
private val hostname: String,

rsocket-transports/nodejs-tcp/src/jsMain/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/TcpServerTransport.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2024 the original author or authors.
2+
* Copyright 2015-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import io.rsocket.kotlin.transport.nodejs.tcp.internal.*
2222
import kotlinx.coroutines.*
2323
import kotlin.coroutines.*
2424

25-
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of new Transport API, use NodejsTcpServerInstance")
25+
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of `rsocket-transport-ktor-tcp` with ktor 3.1")
2626
public class TcpServer internal constructor(
2727
public val job: Job, private val server: Server
2828
) {
@@ -32,7 +32,7 @@ public class TcpServer internal constructor(
3232
}
3333

3434
@Suppress("DEPRECATION_ERROR")
35-
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of new Transport API, use NodejsTcpServerTransport")
35+
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of `rsocket-transport-ktor-tcp` with ktor 3.1")
3636
public class TcpServerTransport(
3737
private val port: Int, private val hostname: String,
3838
) : ServerTransport<TcpServer> {

rsocket-transports/nodejs-tcp/src/jsTest/kotlin/io/rsocket/kotlin/transport/nodejs/tcp/TcpTransportTest.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2024 the original author or authors.
2+
* Copyright 2015-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,11 +35,3 @@ class TcpTransportTest : TransportTest() {
3535
server.close()
3636
}
3737
}
38-
39-
class NodejsTcpTransportTest : TransportTest() {
40-
override suspend fun before() {
41-
val port = PortProvider.next()
42-
startServer(NodejsTcpServerTransport(testContext).target("127.0.0.1", port))
43-
client = connectClient(NodejsTcpClientTransport(testContext).target("127.0.0.1", port))
44-
}
45-
}

0 commit comments

Comments
 (0)