I am looking for a Scala WebSocket client. There are a number of examples, gists and artefacts but most of them don't work (anymore?) and none of them seem to be maintained. A Scala wrapper around AsyncHttpClient would do fine. Thanks for any pointer!
To create a WebSocket and open the connection to FME Server use getWebSocketConnection method. The result is an open WebSocket you can use in your application to communicate with FME Server. This example sends a basic JSON object as a string to the server, and displays the response from the server.
A server can open WebSocket connections with multiple clients—even multiple connections with the same client. It can then message one, some, or all of these clients. Practically, this means multiple people can connect to our chat app, and we can message some of them at a time.
The WebSocket. onmessage property is an EventHandler that is called when a message is received from the server. It is called with a MessageEvent .
The theoretical limit is 65k connections per IP address but the actual limit is often more like 20k, so we use multiple addresses to connect 20k to each (50 * 20k = 1 mil). I then run the web server as root by typing sudo -i followed by ulimit -n 1024000 and then node examples/WebSocket. js (in the uWebSockets.
Time has passed and I think akka-http could be the right choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With