Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

socket.io-adapter

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io-adapter - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# [2.3.0](https://github.com/socketio/socket.io-adapter/compare/2.2.0...2.3.0) (2021-05-10)
### Features
* add a serverSideEmit empty function ([c4cbd4b](https://github.com/socketio/socket.io-adapter/commit/c4cbd4ba2d8997f9ab8e06cfb631c8f9a43d16f1))
* add support for the "wsPreEncoded" writing option ([5579d40](https://github.com/socketio/socket.io-adapter/commit/5579d40c24d15f69e44246f788fb93beb367f994))
# [2.2.0](https://github.com/socketio/socket.io-adapter/compare/2.1.0...2.2.0) (2021-02-27)

@@ -2,0 +11,0 @@

@@ -112,2 +112,7 @@ /// <reference types="node" />

private computeExceptSids;
/**
* Send a packet to the other Socket.IO servers in the cluster
* @param packet - an array of arguments, which may include an acknowledgement callback at the end
*/
serverSideEmit(packet: any[]): void;
}

13

dist/index.js

@@ -108,4 +108,8 @@ "use strict";

const encodedPackets = this.encoder.encode(packet);
const firstPacketOpts = Object.assign({ wsPreEncoded: "4" + encodedPackets[0] }, packetOpts);
this.apply(opts, socket => {
socket.packet(encodedPackets, packetOpts);
socket.client.writeToEngine(encodedPackets[0], firstPacketOpts);
for (let i = 1; i < encodedPackets.length; i++) {
socket.client.writeToEngine(encodedPackets[i], packetOpts);
}
});

@@ -218,3 +222,10 @@ }

}
/**
* Send a packet to the other Socket.IO servers in the cluster
* @param packet - an array of arguments, which may include an acknowledgement callback at the end
*/
serverSideEmit(packet) {
throw new Error("this adapter does not support the serverSideEmit() functionality");
}
}
exports.Adapter = Adapter;

2

package.json
{
"name": "socket.io-adapter",
"version": "2.2.0",
"version": "2.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc