Socket
Socket
Sign inDemoInstall

socket.io-client

Package Overview
Dependencies
4
Maintainers
2
Versions
127
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1345
13Next

4.6.0-alpha1

Diff

darrachequesne
published 4.5.4 •

Changelog

Source

4.5.4 (2022-11-22)

This release contains a bump of the socket.io-parser dependency, in order to fix CVE-2022-2421.

Dependencies

darrachequesne
published 4.5.3 •

Changelog

Source

4.5.3 (2022-10-15)

Bug Fixes

  • do not swallow user exceptions (2403b88)

Dependencies

darrachequesne
published 4.5.2 •

Changelog

Source

4.5.2 (2022-09-02)

Bug Fixes

  • handle ill-formatted packet from server (c597023)

Dependencies

darrachequesne
published 2.5.0 •

Changelog

Source

2.5.0 (2022-06-26)

Bug Fixes

  • ensure buffered events are sent in order (991eb0b)

Dependencies

darrachequesne
published 4.5.1 •

Changelog

Source

4.5.1 (2022-05-17)

There were some minor bug fixes on the server side, which mandate a client bump.

Dependencies

darrachequesne
published 4.5.0 •

Changelog

Source

4.5.0 (2022-04-23)

Features

Additional details for the disconnect event

The "disconnect" event will now include additional details to help debugging if anything has gone wrong.

Example when a payload is over the maxHttpBufferSize value in HTTP long-polling mode:

socket.on("disconnect", (reason, details) => {
  console.log(reason); // "transport error"

  // in that case, details is an error object
  console.log(details.message); "xhr post error"
  console.log(details.description); // 413 (the HTTP status of the response)

  // details.context refers to the XMLHttpRequest object
  console.log(details.context.status); // 413
  console.log(details.context.responseText); // ""
});

Added in b862924.

Catch-all listeners for outgoing packets

This is similar to onAny(), but for outgoing packets.

Syntax:

socket.onAnyOutgoing((event, ...args) => {
  console.log(event);
});

Added in 74e3e60.

Slice write buffer according to the maxPayload value

The server will now include a "maxPayload" field in the handshake details, allowing the clients to decide how many packets they have to send to stay under the maxHttpBufferSize value.

Added in 46fdc2f.

Dependencies

darrachequesne
published 4.4.1 •

Changelog

Source

4.4.1 (2022-01-06)

darrachequesne
published 4.4.0 •

Changelog

Source

4.4.0 (2021-11-18)

Bug Fixes

Features

socket.timeout(5000).emit("my-event", (err) => {
  if (err) {
    // the server did not acknowledge the event in the given delay
  }
});
darrachequesne
published 4.3.2 •

Changelog

Source

4.3.2 (2021-10-16)

Bug Fixes

  • restore the default export (bis) (6780f29)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc