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

protomux-rpc

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protomux-rpc - npm Package Compare versions

Comparing version 1.5.2 to 1.6.0

31

index.js

@@ -94,10 +94,11 @@ const EventEmitter = require('events')

if (requestEncoding) value = c.decode(requestEncoding, value)
this._responding++
try {
if (requestEncoding) value = c.decode(requestEncoding, value)
value = await responder.handler(value)
} catch (err) {
safetyCatch(err)
error = err.message

@@ -109,3 +110,9 @@ }

if (!error && responseEncoding && id) {
value = c.encode(responseEncoding, value)
try {
value = c.encode(responseEncoding, value)
} catch (err) {
safetyCatch(err)
error = err.message
}
}

@@ -137,5 +144,11 @@ }

if (responseEncoding) value = c.decode(responseEncoding, value)
try {
if (responseEncoding) value = c.decode(responseEncoding, value)
request.resolve(value)
request.resolve(value)
} catch (err) {
safetyCatch(err)
request.reject(err)
}
}

@@ -158,2 +171,6 @@

get opened () {
return this._channel.opened
}
get closed () {

@@ -171,2 +188,6 @@ return this._channel.closed

async fullyOpened () {
await this._channel.fullyOpened()
}
respond (method, options, handler) {

@@ -173,0 +194,0 @@ if (typeof options === 'function') {

4

package.json
{
"name": "protomux-rpc",
"version": "1.5.2",
"version": "1.6.0",
"description": "RPC over Protomux channels",

@@ -33,3 +33,3 @@ "main": "index.js",

"compact-encoding-bitfield": "^1.0.0",
"protomux": "^3.2.1",
"protomux": "^3.7.0",
"safety-catch": "^1.0.2"

@@ -36,0 +36,0 @@ },

@@ -65,2 +65,6 @@ # Protomux RPC

#### `rpc.opened`
Whether or not the RPC channel is opened.
#### `rpc.mux`

@@ -121,2 +125,6 @@

#### `await rpc.fullyOpened()`
Resolves when the rpc is fully setup, or rejects if the setup failed.
#### `await rpc.end()`

@@ -123,0 +131,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