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

binary-socket

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-socket - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

12

dist/SocketClient.js

@@ -46,2 +46,4 @@ 'use strict';

var _stream2 = _interopRequireDefault(_stream);
var _bufferStreamReader = require('buffer-stream-reader');

@@ -59,3 +61,3 @@

var _stream2 = require('./stream');
var _stream3 = require('./stream');

@@ -162,3 +164,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

try {
data = _stream2.msgpack.decode(data);
data = _stream3.msgpack.decode(data);
} catch (ex) {

@@ -186,3 +188,3 @@ return _this.emit('error', new Error('Received broken data: ' + ex));

var meta = data[1];
var newBinaryStream = new _stream2.BinaryStream(_this._socket, streamId, false);
var newBinaryStream = new _stream3.BinaryStream(_this._socket, streamId, false);
newBinaryStream.on('close', function () {

@@ -242,3 +244,3 @@ delete _this.streams[streamId];

var stream = this.createStream(meta);
if (data instanceof _stream.Stream) {
if (data instanceof _stream2.default) {
data.pipe(stream);

@@ -261,3 +263,3 @@ } else if (_buffer.Buffer.isBuffer(data)) {

var streamId = (0, _helpers.randomId)(12);
var binaryStream = new _stream2.BinaryStream(this._socket, streamId, true, meta);
var binaryStream = new _stream3.BinaryStream(this._socket, streamId, true, meta);
binaryStream.on('close', function () {

@@ -264,0 +266,0 @@ delete _this2.streams[streamId];

@@ -30,2 +30,4 @@ 'use strict';

var _stream2 = _interopRequireDefault(_stream);
var _msgpack = require('msgpack5');

@@ -171,4 +173,4 @@

return BinaryStream;
}(_stream.Stream);
}(_stream2.default);
exports.default = BinaryStream;
{
"name": "binary-socket",
"version": "0.5.4",
"version": "0.5.5",
"description": "Simple Binary Sockets to use, builded on thoroughly tested modules, standards and it's easy to integrate.",

@@ -5,0 +5,0 @@ "main": "index.js",

import EventEmitter from 'events';
import {Stream} from 'stream';
import Stream from 'stream';
import BufferStreamReader from 'buffer-stream-reader';

@@ -4,0 +4,0 @@ import {Buffer} from 'buffer';

@@ -1,2 +0,2 @@

import {Stream} from 'stream';
import Stream from 'stream';
import Msgpack5 from 'msgpack5';

@@ -3,0 +3,0 @@ export const msgpack = Msgpack5();

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