Skip to content

Releases: SocketCluster/socketcluster-client

v6.1.0

08 Jul 00:25
Compare
Choose a tag to compare
  • Fixed a bug which was causing event callbacks to always timeout with an error when the client socket's cloneData option was set to true.

Breaking change:

  • A new BadConnectionError type was added - Now, if a connection fails or is aborted, all pending events will be aborted and their callbacks will be invoked with a BadConnectionError error as the first argument.
    This will allow failed events to be handled sooner which may have implications when it comes to recovering from server crashes.

v5.5.2

02 Jul 20:28
Compare
Choose a tag to compare

Fixed issue with React Native.

v5.5.1

06 Jun 19:26
Compare
Choose a tag to compare

Updated sc-errors version.

v5.5.0

26 May 23:23
Compare
Choose a tag to compare
  • Updated ws module to v3.0.0.
  • Minor non-breaking updates to various dependencies.

v5.3.0

09 Mar 00:47
Compare
Choose a tag to compare
  • You can now specify autoConnect: false as an option to var socket = socketCluster.connect(options) - If it is false, the socket will not start connecting to the server until you invoke socket.connect() explicitly.
  • Added a new 'connecting' event which gets triggered whenever the socket starts connecting to the server - This includes reconnects. Note that if you want to capture the very first 'connecting' event, you will need to set autoConnect to false and register your event handler before you call socket.connect().

v5.2.4

02 Jan 15:21
Compare
Choose a tag to compare

Made cloneData false by default for efficiency reasons.

v5.2.3

02 Jan 15:02
Compare
Choose a tag to compare

Disconnect socket when using socketCluster.destroy().

v5.2.2

02 Jan 14:48
Compare
Choose a tag to compare

Expose a socketCluster.connections object which allows you to see existing connections (useful if multiplex: false or if connecting to multiple WS services).

v5.2.1

02 Jan 14:15
Compare
Choose a tag to compare

Updated sc-emitter for support for sc-domain.

v5.2.0

02 Jan 12:39
Compare
Choose a tag to compare

When using emit, publish, etc... It will clone the input data by default.

Before, if the socket was disconnected and you published/emitted an object (by reference) and then changed it immediately after the function was called, then by the time the connection was re-established, it would emit the modified object instead of the object as it appeared at the time the emit/publish was invoked.

You can set the 'cloneData' option to false (from socketCluster.connect(options)) to turn this off.