First experiment with WebSocket and Kotlin Coroutine
output:
main Start!
[job1] Open: Response{protocol=http/1.1, code=101, message=Web Socket Protocol Handshake, url=http://echo.websocket.org/}
[job2] Open: Response{protocol=http/1.1, code=101, message=Web Socket Protocol Handshake, url=http://echo.websocket.org/}
[job1] --> Hi, I am job1 @ 1!
[job2] --> Hi, I am job2 @ 1!
[job2] <-- Hi, I am job2 @ 1!
[job1] <-- Hi, I am job1 @ 1!
[job1] --> Hi, I am job1 @ 2!
[job2] --> Hi, I am job2 @ 2!
[job2] <-- Hi, I am job2 @ 2!
[job1] <-- Hi, I am job1 @ 2!
[job1] --> Hi, I am job1 @ 3!
[job2] --> Hi, I am job2 @ 3!
[job2] <-- Hi, I am job2 @ 3!
[job1] <-- Hi, I am job1 @ 3!
[job2] Finish!
[job1] Finish!
main Finish!
Process finished with exit code 0
that's my
build.gradle