rust-socketio icon indicating copy to clipboard operation
rust-socketio copied to clipboard

Add an example

Open 1c3t3a opened this issue 5 years ago • 8 comments

The typical socket.io example is a chat server. This tackles the concept of namespaces as well as a persistent communication with multiple clients. If you're looking for the server-side code, have a look here: https://github.com/socketio/socket.io/tree/master/examples/chat

1c3t3a avatar Jan 05 '21 10:01 1c3t3a

The typical socket.io example is a chat server. This tackles the concept of namespaces as well as a persistent communication with multiple clients. If you're looking for the server-side code, have a look here: https://github.com/socketio/socket.io/tree/master/examples/chat

Hey is there any updates on this? I'm quite interested in the library but I'd like to have a demo for the chat example provided

WildEgo avatar Mar 04 '22 21:03 WildEgo

Hi @WildEgo, nice that you're interested in the library! Until now I didn't find the time for adding that example (that's why I also added the good first issue label ;) Feel free to add the example and ask questions if they arise, I am happy to assist!

1c3t3a avatar Mar 06 '22 09:03 1c3t3a

@1c3t3a I just used your crate recently and have some spare cycles I could use to make a Rust client example. Was the thought to use the example chat as a server and implement a cli chat client?

BWStearns avatar Feb 22 '23 16:02 BWStearns

Happy to hear that! :) The example can be similar to the one in the socket.io tree (https://github.com/socketio/socket.io/tree/master/examples/chat). A CLI (or just some executable binary) would be super nice to show the capabilities!

1c3t3a avatar Feb 23 '23 19:02 1c3t3a

ok awesome. I'll get started on it soon. Just to make sure I don't poison the well by recommending bad practices, is the way I blocked to wait for the WS responses here a "legit" way of doing it or is there a more canonical way?

BWStearns avatar Feb 23 '23 19:02 BWStearns

This looks fine! If you open a PR I can also review for readability of the code :)

1c3t3a avatar Feb 26 '23 17:02 1c3t3a

Dope, thanks for the sanity check. I'll get a draft in tomorrow.

BWStearns avatar Feb 27 '23 05:02 BWStearns

Any updates here?

tbmreza avatar May 02 '24 23:05 tbmreza