New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

websocket

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

lib/websocket.js

@@ -7,3 +7,3 @@ module.exports = {

"request" : require('./WebSocketRequest'),
"version" : "0.0.8"
"version" : "0.0.9"
};

@@ -353,6 +353,5 @@ var crypto = require('crypto');

WebSocketConnection.prototype.sendUTF = function(data) {
data = new Buffer(data);
var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config);
frame.opcode = 0x01; // WebSocketOpcode.TEXT_FRAME
frame.binaryPayload = new Buffer(data, 'utf8');
frame.binaryPayload = new Buffer(data.toString(), 'utf8');
this.fragmentAndSend(frame);

@@ -362,2 +361,5 @@ };

WebSocketConnection.prototype.sendBytes = function(data) {
if (!Buffer.isBuffer(data)) {
throw new Error("You must pass a Node Buffer object to WebSocketConnection.prototype.sendBytes()");
}
var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config);

@@ -364,0 +366,0 @@ frame.opcode = 0x02; // WebSocketOpcode.BINARY_FRAME

@@ -6,3 +6,3 @@ {

"author": "Brian McKelvey <brian@worlize.com>",
"version": "0.0.8",
"version": "0.0.9",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

@@ -122,3 +122,3 @@ WebSocket Client & Server Implementation for Node

connection.on('close', function() {
console.log("dumb-increment-protocol Connection Closed");
console.log("echo-protocol Connection Closed");
})

@@ -132,3 +132,3 @@ connection.on('message', function(message) {

var number = Math.round(Math.random() * 0xFFFFFF);
connection.sendUTF(number);
connection.sendUTF(number.toString());
setTimeout(sendNumber, 1000);

@@ -135,0 +135,0 @@ }

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