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
^ Generally, you should avoid targeting clients explicitly - Instead, you should use a pub/sub approach.
256
257
257
258
Broadcast to all interested sockets/sessions (on all worker processes):
258
259
```js
@@ -269,7 +270,7 @@ will receive it. SocketCluster is efficient and works more like a pub/sub system
269
270
When you listen to an even on the client using socket.on(...), it will send a 'subscribe' event to the backend which
270
271
may be intercepted/blocked by your middleware if appropriate.
271
272
272
-
On the socket (only use this one if you know what you're doing; generally, it's better to emit on a session):
273
+
On the socket:
273
274
```js
274
275
socket.emit('foo', eventData, callback);
275
276
```
@@ -379,10 +380,9 @@ wsServer.addMiddleware(wsServer.MIDDLEWARE_EVENT, function (socket, event, data,
379
380
380
381
## Contribute to SocketCluster
381
382
382
-
- Tests needed - While some of the underlying modules of SC are well tested,
383
-
it would be nice to add some higher-level tests to help maintain high code quality.
384
-
- Documentation - Inline source documentation is needed.
385
-
- Benchmarks - More benchmarks - Particularly, it would be nice to get an idea of how many concurrent connections SocketCluster can handle on a big machine.
383
+
- Security - Identify and fix any vulnerabilities.
384
+
- More test cases needed.
385
+
- Documentation - Inline source documentation (commenting) is needed.
386
386
- Efficiency/speed - faster is better!
387
387
388
388
To contribute; clone this repo, then cd inside it and then run npm install to install all dependencies.
0 commit comments