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

ipevt

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipevt - npm Package Compare versions

Comparing version 0.9.7 to 0.9.8

43

ipevt-client.js

@@ -8,10 +8,3 @@ /**

const beson = (()=>{
try {
return require(require.resolve('beson', {paths:require.main.paths}));
}
catch(e) {
return require('beson');
}
})();
const beson = require('beson');
const events = require('events');

@@ -127,3 +120,3 @@ const net = require('net');

auto_reconnect=false, retry_count=-1, retry_interval=5,
debug=false,
debug=false, serializer=beson.Serialize, deserializer=beson.Deserialize
} = options;

@@ -134,4 +127,8 @@ if ( !host || !port || !channel_id ) {

if ( typeof serializer !== "function" || typeof deserializer !== "function" ) {
throw new Error("Client serializer and deserializer must be functions!");
}
const inst = new events.EventEmitter();

@@ -156,2 +153,4 @@ const client = Object.create(null);

client.num_reties = 0;
client.serialize = serializer;
client.deserialize = deserializer;
PRIVATE.set(inst, client);

@@ -201,3 +200,3 @@

const client = PRIVATE.get(this);
const {socket, state} = client;
const {socket, state, serialize} = client;
const type = Buffer.from([MSG_TYPE.CALL]);

@@ -229,3 +228,3 @@ const unique_id = GenInstId(true);

for(const arg of args) {
const payload = Buffer.from(beson.Serialize(arg));
const payload = Buffer.from(serialize(arg));
const payload_len = Buffer.alloc(4);

@@ -240,3 +239,3 @@ payload_len.writeUInt32LE(payload.length);

for(const arg of args) {
const payload = Buffer.from(beson.Serialize(arg));
const payload = Buffer.from(serialize(arg));
const payload_len = Buffer.alloc(4);

@@ -260,3 +259,3 @@ payload_len.writeUInt32LE(payload.length);

const client = PRIVATE.get(this);
const {socket, state} = client;
const {socket, state, serialize} = client;
const type = Buffer.from([MSG_TYPE.EVNT]);

@@ -267,3 +266,3 @@ const event_name = Buffer.from(event, "utf8");

const payload = Buffer.from(beson.Serialize(arg));
const payload = Buffer.from(serialize(arg));
const payload_len = Buffer.alloc(4);

@@ -295,3 +294,2 @@ payload_len.writeUInt32LE(payload.length);

};
function BuildConnection(client) {

@@ -332,5 +330,2 @@ const {remote_host:host, remote_port:port, inst} = client;

}
function _PARSE_CLIENT_DATA() {

@@ -401,3 +396,3 @@ CLIENT_STATE.timeout = null;

else {
const payload = Buffer.from(beson.Serialize(arg));
const payload = Buffer.from(client.serialize(arg));
len.writeUInt32LE(payload.length);

@@ -419,3 +414,3 @@

else {
const payload = Buffer.from(beson.Serialize(arg));
const payload = Buffer.from(client.serialize(arg));
len.writeUInt32LE(payload.length);

@@ -501,3 +496,3 @@ client.socket.write(len);

args.push(beson.Deserialize(arg));
args.push(client.deserialize(arg));
}

@@ -530,3 +525,3 @@ }

client.chunk = client.chunk.slice(reader.offset);
return { type:MSG_TYPE.CALL_SUCC, unique_id, result:beson.Deserialize(result), client };
return { type:MSG_TYPE.CALL_SUCC, unique_id, result:client.deserialize(result), client };
}

@@ -550,3 +545,3 @@

client.chunk = client.chunk.slice(reader.offset);
return { type:MSG_TYPE.CALL_FAIL, unique_id, error:beson.Deserialize(error), client };
return { type:MSG_TYPE.CALL_FAIL, unique_id, error:client.deserialize(error), client };
}

@@ -573,3 +568,3 @@

client.chunk = client.chunk.slice(reader.offset);
return {type:MSG_TYPE.EVNT, event, arg:beson.Deserialize(arg), client};
return {type:MSG_TYPE.EVNT, event, arg:client.deserialize(arg), client};
}

@@ -576,0 +571,0 @@

{
"name": "ipevt",
"version": "0.9.7",
"version": "0.9.8",
"description": "A small library that allows peers to communicate via a central server",

@@ -5,0 +5,0 @@ "main": "ipevt-client.js",

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