-
Notifications
You must be signed in to change notification settings - Fork 311
Add chat example #174
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
Comments
I feel like the echo example covers the library well while still being light weight. The gorilla chat example is much more involved. If you feel the echo example along with the comparison in the README does not suffice, then we can explore this. |
I think chat example covers a lot more. And yes echo example shows basic usage quite well. But still something like chat example as this a common use case for websocket and easy to understand. |
Fair enough. |
My plan is to just remove the echo example and turn it into a full fledged chat example. |
@nhooyr not sure why you want to remove it. Why it's bad keeping both? But if you think this way just remove it. |
Hi!! For the past days, I have been working on a chat CLI written in go and using this WebSocket library. I'm not a very experience go developer, but I wanted to learn more and also use WebSockets, which I haven't had the chance to do at my work. I'm more than happy to go over my example, and if it's good, we can port it as documentation to the library. Here is the repo https://github.com/GustavoCaso/go-chat-websockets Is missing a README and how to use it, but I plan on keep adding more logic into it. Also, I plan on writing a blog post to help other developers. Congrats on the library @nhooyr 🎉 |
I wrote a wrapper using nhooyr/websocket as well - sockparty which is very easy to turn into a chat with a few lines. |
That's awesome, please do. I'll take care of this issue myself though soon as I have similar code already written. I'll add a link to your code and @izzymg's though in the README or wiki. |
Added in #190 Needs docs but you can easily run with |
@nhooyr In the current chat example you use a |
It would work as well but I made it an endpoint so you could publish messages via curl easily. Will document this decision better. |
Fixed in #225 |
Hello @nhooyr,
maybe you could add chat example something like https://github.com/gorilla/websocket/tree/master/examples/chat would be easier to compare both implementations and also would serve as documentation.
The text was updated successfully, but these errors were encountered: