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

rpc-websockets

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rpc-websockets - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1

benchmarks/a.js

9

dist/lib/client.js
/**
* "Client" wraps the "uWebSockets/bindings" or a browser-implemented "WebSocket" library
* "Client" wraps "qaap/uws-bindings" or a browser-implemented "WebSocket" library
* according to the environment providing JSON RPC 2.0 support on top.

@@ -80,2 +80,3 @@ * @module Client

* @param {Object} options - ws options object with reconnect parameters
* @param {Function} generate_request_id - custom generation request Id
* @return {Client}

@@ -96,2 +97,3 @@ */

var generate_request_id = arguments[2];
(0, _classCallCheck3.default)(this, Client);

@@ -110,2 +112,5 @@

_this.current_reconnects = 0;
_this.generate_request_id = generate_request_id || function () {
return ++_this.rpc_id;
};

@@ -147,3 +152,3 @@ if (_this.autoconnect) _this._connect(address, arguments[1]);

var rpc_id = ++_this2.rpc_id;
var rpc_id = _this2.generate_request_id(method, params);

@@ -150,0 +155,0 @@ var message = {

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

/* A wrapper for the "uWebSockets/bindings" library. */
/* A wrapper for the "qaap/uws-bindings" library. */

@@ -3,0 +3,0 @@ "use strict";

/**
* "Server" wraps the "uWebSockets/bindings" library providing JSON RPC 2.0 support on top.
* "Server" wraps the "qaap/uws-bindings" library providing JSON RPC 2.0 support on top.
* @module Server

@@ -4,0 +4,0 @@ */

{
"name": "rpc-websockets",
"version": "3.6.0",
"version": "3.6.1",
"description": "JSON-RPC 2.0 implementation over WebSockets for Node.js",

@@ -28,3 +28,3 @@ "main": "./dist/index.js",

"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-eslint": "^8.1.2",
"babel-plugin-add-module-exports": "^0.2.1",

@@ -36,3 +36,3 @@ "babel-plugin-transform-runtime": "^6.15.0",

"coveralls": "^3.0.0",
"eslint": "^4.8.0",
"eslint": "^4.14.0",
"istanbul": "^0.4.5",

@@ -39,0 +39,0 @@ "mocha": "^4.0.1",

@@ -114,2 +114,3 @@ <div align="center">

* `max_reconnects` {Number}: Maximum number of times the client should try to reconnect. Defaults to `5`.
* `generate_request_id` {Function} Custom function to generate request id instead of simple increment by default. Passes `method` and `params` to parameters.

@@ -116,0 +117,0 @@ ### ws.call(method[, params[, timeout[, μws_options]]]) -> Promise

Sorry, the diff of this file is too big to display

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