engine.io-client
Advanced tools
Changelog
6.2.0 (2022-04-17)
The close 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("close", (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); // ""
});
Note: the error object was already included before this commit and is kept for backward compatibility.
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.
Changelog
6.0.0 (2021-10-08)
This major release contains three important changes:
There is now three distinct builds (in the build/ directory):
And three bundles (in the dist/ directory) :
engine.io.js
: unminified UMD bundleengine.io.min.js
: minified UMD bundleengine.io.esm.min.js
: ESM bundlePlease note that the communication protocol was not updated, so a v5 client will be able to reach a v6 server (and vice-versa).
Reference: https://github.com/socketio/engine.io-protocol
ws
version: ~8.2.3