-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive client that processes user input? #135
Comments
I have not implemented anything like this, but my best guess is you need to do one of the following:
Making a WebSocket client automatically reconnect is not a good idea as the protocol provides no application-level support for this and it can result in lost messages. You need to implement this in the application layer. |
@jcoglan thank you for the suggestions, you point me on the right direction.
|
Hi,
I would like to create a client that reads the user input in console and sends it to the server; I did some tests with STDIN.gets inside a loop, plain, within a thread and with EM.tick_loop, but I was unable to achieve the desidered result. Is there any best pratice / code example around?
Bonus point: the client should reconnect on lost network; this could make the things trickyer as I found experimenting with the websocket-client-simple gem.
Thanks! :)
The text was updated successfully, but these errors were encountered: