JavaScript client for SocketCluster
Consumer
API. See https://socketcluster.io/docs/consumers/
autoConnect: false
being ignored when socketCluster.create(...)
was called a second time and it tried to reuse the same multiplexed socket as before (the issue could only happen if multiplex
was true in both calls) - In the second call it would try to auto connect; even though autoConnect
was false.SCSocket
to SCClientSocket
.authToken
changes (not just the first time) - This change was done so that the client side SCSocket would be more consistent with the behavior of the server side SCSocket. This change affects scenarios where one user's authToken overrides a previously logged in user's authToken (e.g. If a new user logs in while another user account is already logged into the same machine/browser).authTokenChange
event was removed; this event is no longer necessary since it is now equivalent to listening to both the authenticate
and deauthenticate
events.pingTimeoutDisabled
option on the client which can be used to prevent the client socket from disconnecting itself because of a ping timeout.socketCluster.connect(options)
method was renamed to socketCluster.create(options)
(the connect
alias is still available but deprecated).socket.destroy()
is now supported and is the same as calling socketCluster.destroy(socket)
.socketCluster.clients
(previously called socketCluster.connections
) object/map.socketCluster.connections
object was renamed to socketCluster.clients
socketCluster.destroy(...)
method now takes a socket
object as argument (instead of an options
object).Fixed issue with missing callback error in specific situations.
Added gulp build process. Fixed React Native error related to addEventListener function being undefined.
Added subscription batching - This allows the client to subscribe to multiple channels using a single WebSocket frame for a performance boost.
Bug fix: the 'raw' event argument will now always be a string. There was an issue in older versions where a JSON string would be cast to an object.