-
Notifications
You must be signed in to change notification settings - Fork 40
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
Example suggestion #12
Comments
Would also be great if the example included an example of broadcasting through websocket to all clients |
Hi Simen - I'm pretty sure I've got an example of that kicking around somewhere - will see what I can find. James |
I've managed to do the broadcasting by having the server hold a reference to a mult and tapping with a dropping buffer for each new web socket channel. I'm unsure how to avoid leaking channels. I have regular updates sent from the server, so how do I clean up when a client leaves? The dropping buffer was a workaround to avoid holding up the mult. |
Probably not the right solution. See jarohen/chord#12
Any luck finding that example @james-henderson ? I'm running into trouble using mults to distribute to clients. When I hit refresh in a client's browser, it seems to hang on to the tap (never untapped) and therefore holds the mult up indefinitely. There must be a better way I'm missing! Dropping-buffer just seems to lose important events. |
I couldn't find it, I'm afraid - I've moved companies since so it is probably in an old proprietary codebase :( Will take a look at your code snippets when I get a moment :) James |
Alright no worries. You may find I switched to another popular library ;) On Wednesday, July 1, 2015, James Henderson notifications@github.com
|
Strewth that was quick. Sorry. James |
@dxlr8r @camelpunch I've updated the example app to be a 'multiplayer chat' app - have a look here for the handler code. Let me know what you think :) |
Looks good. What's the thing I'm likely to be missing if, say, dead clients cause future ones to be unresponsive? As an aside, switching to Sente removed the problem, but then Sente does all sorts of reconnecting magic and wraps all sends in a function. |
As a guess, I'd say probably the call to |
It would be great if there were a minimal working example using
chord
withhttp-kit
. The current example uses a lot of tools from several libraries, which is fine, but makes it difficult to understand at a basic level how to use this library. I'd be happy to send you a pull request of such an example but I'm having difficulty hooking it up. 😉The text was updated successfully, but these errors were encountered: