taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.73k stars 193 forks source link

Add server->client send with cb + timeout support? #423

Open ptaoussanis opened 1 year ago

ptaoussanis commented 1 year ago

Current chsk-send! API:

It may be useful to add a low-level (private?) server-side method like (fn [client-id event & [?timeout-ms ?cb-fn]]).

Uses include:

shader commented 8 months ago

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:

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.