You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I'd like to have something like this, since I think clients should be able to subscribe to some events separately.
Here's the use case / pattern I'm considering:
send "global events" to uid (notifications, chat messages, etc.)
send "local events" to specific client, e.g. update events for the object/document that the client is viewing. Different clients from the same user will likely be viewing and thus subscribed to different things.
I think it should be somewhat straightforward to factor out the "client-id sending" part from the "uid sending" and then call it directly, given a client-id.
Current
chsk-send!
API:(fn [event & [?timeout-ms ?cb-fn]])
(fn [user-id event])
It may be useful to add a low-level (private?) server-side method like
(fn [client-id event & [?timeout-ms ?cb-fn]])
.Uses include:
ws-ping
events issued by server, to mirror the new pong forws-ping
events issued by client to address How to detect loss of network connection client-side in Chrome #259.The text was updated successfully, but these errors were encountered: