Skip to content

Commit 1f78d9c

Browse files
committed
Log message when connecting to client in TCP client mode
1 parent 2f75884 commit 1f78d9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/kotlin/org/javacs/kt/TcpSockets.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ fun tcpStartServer(port: Int): Pair<InputStream, OutputStream> = ServerSocket(po
1818
* Starts a TCP client socket and connects to the client at
1919
* the specified address, then returns a pair of IO streams.
2020
*/
21-
fun tcpConnectToClient(host: String, port: Int): Pair<InputStream, OutputStream> = Socket(host, port)
21+
fun tcpConnectToClient(host: String, port: Int): Pair<InputStream, OutputStream> =
22+
run { LOG.info("Connecting to client at {}:{}...", host, port) }
23+
.let { Socket(host, port) }
2224
.let { Pair(it.inputStream, it.outputStream) }

0 commit comments

Comments
 (0)