Highly scalable realtime pub/sub and RPC framework
MIT License
Bot releases are hidden (Show)
Published by jondubois about 7 years ago
master.js
(masterController) file to the default boilerplate.workerClusterStart
, workerClusterReady
and workerClusterExit
.Published by jondubois over 7 years ago
Updated the bundled version of socketcluster-client
to v6.2.0
. There are no breaking changes to SocketCluster itself but there is a minor breaking change on the client. See https://github.com/SocketCluster/socketcluster-client/releases/tag/v6.2.0
Published by jondubois over 7 years ago
Note that the affected feature was not publicly documented on the website. That's why this is only a minor release.
There is a change to the optional callback to the client socket.publish(channelName, data, callback)
function.
The second argument to the callback used to be the data which was published to the channel (after all transformations had been carried-out by the middleware), now the second argument will be undefined by default.
The second argument now needs to be specified explicitly inside the MIDDLEWARE_PUBLISH_IN middleware like this:
scServer.addMiddleware(scServer.MIDDLEWARE_PUBLISH_IN, function (req, next) {
// This is how you can send back data as the second argument to the client `socket.publish` callback.
// Note that if you have multiple middleware functions in the MIDDLEWARE_PUBLISH_IN line, the
// next middleware function will be able to access the existing req.ackData property and modify it.
// It's the final state of req.ackData which will be sent back to the client.
req.ackData = {someCustomProperty: 'This is some data to send back'};
next();
});
If you want to maintain the old behaviour without having to think, you can just add this middleware function in your code after all other middleware functions in the MIDDLEWARE_PUBLISH_IN line:
scServer.addMiddleware(scServer.MIDDLEWARE_PUBLISH_IN, function (req, next) {
req.ackData = req.data;
next();
});
Published by jondubois over 7 years ago
Added new events on the SCServer
object which refer to a socket. This allows developers to listen to certain socket events from a central place. These new events are:
subscription
unsubscription
authentication
deauthentication
Also, fixed the authenticate
and deauthenticate
events on the server-side socket (SCSocket
) object - Before, these events were not always being triggered correctly. These events were not officially documented on the website until now (unlike the client-side socket's authenticate
and deauthenticate
events).
The handler to the badSocketAuthToken
event (which is emitted on SCServer
) used to accept a single status
object argument. Now it accepts two arguments; the first of which is the socket
object and the second of which is the status
object. Note that the status object no longer has a socket
property.
Published by jondubois over 7 years ago
No longer using raw errors from jsonwebtoken module.
Now JWT errors will be converted on the server side to SC errors which match those sent to the client.
Published by jondubois over 7 years ago
Upgraded uws
to version 0.13.0
.
Published by jondubois over 7 years ago
Added missing badSocketAuthToken
event on the server. See http://socketcluster.io/#!/docs/api-scserver
Added missing badAuthToken
event on the server-side socket. See http://socketcluster.io/#!/docs/api-scsocket-server
Note that the documentation for these events existed on the website for a long time but these events were actually missing in new versions of SC until now. Note that the docs on the website have been updated to reflect the latest implementation.
Published by jondubois over 7 years ago
The server-side socket object now has a signedAuthToken
property which contains the signed JWT when authentication succeeds.
Published by jondubois over 7 years ago
Added support for MIDDLEWARE_AUTHENTICATE middleware.
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Published by jondubois about 10 years ago
Polish up
Published by jondubois about 10 years ago
Switched to UNIX sockets from TCP sockets for IPC. This should make SC much more efficient.
Published by jondubois about 10 years ago