socket.io-adapter
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -0,1 +1,10 @@ | ||
## [2.3.3](https://github.com/socketio/socket.io-adapter/compare/2.3.2...2.3.3) (2021-11-16) | ||
### Bug Fixes | ||
* fix broadcasting volatile packets with binary attachments ([88eee59](https://github.com/socketio/socket.io-adapter/commit/88eee5948aba94f999405239025f29c754a002e2)) | ||
## [2.3.2](https://github.com/socketio/socket.io-adapter/compare/2.3.1...2.3.2) (2021-08-28) | ||
@@ -2,0 +11,0 @@ |
@@ -101,3 +101,3 @@ "use strict"; | ||
const flags = opts.flags || {}; | ||
const basePacketOpts = { | ||
const packetOpts = { | ||
preEncoded: true, | ||
@@ -109,15 +109,4 @@ volatile: flags.volatile, | ||
const encodedPackets = this.encoder.encode(packet); | ||
const packetOpts = encodedPackets.map(encodedPacket => { | ||
if (typeof encodedPacket === "string") { | ||
return Object.assign(Object.assign({}, basePacketOpts), { wsPreEncoded: "4" + encodedPacket // "4" being the "message" packet type in Engine.IO | ||
}); | ||
} | ||
else { | ||
return basePacketOpts; | ||
} | ||
}); | ||
this.apply(opts, socket => { | ||
for (let i = 0; i < encodedPackets.length; i++) { | ||
socket.client.writeToEngine(encodedPackets[i], packetOpts[i]); | ||
} | ||
socket.client.writeToEngine(encodedPackets, packetOpts); | ||
}); | ||
@@ -124,0 +113,0 @@ } |
{ | ||
"name": "socket.io-adapter", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36498
10
1046
1