cleaned up tcpserver.lyng, again ;)

This commit is contained in:
Sergey Chernov 2026-04-09 19:01:26 +03:00
parent 73ec8f9be6
commit 717758149b

View File

@ -2,7 +2,7 @@ import lyng.io.net
val host = "127.0.0.1" val host = "127.0.0.1"
val clientCount = 1000 val clientCount = 1000
val server = Net.tcpListen(0, host, clientCount, true) as TcpServer val server = Net.tcpListen(0, host, clientCount, true)
val port = server.localAddress().port val port = server.localAddress().port
fun payloadFor(index: Int) = "$index:${Random.nextInt()}:${Random.nextInt()}" fun payloadFor(index: Int) = "$index:${Random.nextInt()}:${Random.nextInt()}"