Socket
Socket
Sign inDemoInstall

@push-rpc/core

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@push-rpc/core - npm Package Compare versions

Comparing version 1.0.29 to 1.0.30

13

dist/RpcSession.js

@@ -110,6 +110,11 @@ "use strict";

resubscribeTopics(this.remote);
socket.onPing(function () {
_this.listeners.messageIn("PING");
});
if (this.pingSendTimeout) {
this.pingTimer = setTimeout(this.sendPing, this.pingSendTimeout);
socket.onPong(function () {
_this.listeners.messageIn("PONG");
}
socket.onPong(function () {
_this.listeners.messageIn("PONG");
if (_this.pingSendTimeout) {
if (_this.runningCalls[PING_MESSAGE_ID]) {

@@ -120,4 +125,4 @@ _this.runningCalls[PING_MESSAGE_ID].resolve();

_this.sendCall();
});
}
}
});
this.callTimeoutTimer = setInterval(function () { return _this.timeoutCalls(); }, 1000); // every 1s

@@ -124,0 +129,0 @@ };

@@ -7,2 +7,3 @@ export interface Socket {

onPong(h: () => void): any;
onPing(h: () => void): any;
terminate(): any;

@@ -9,0 +10,0 @@ send(data: string): any;

{
"name": "@push-rpc/core",
"version": "1.0.29",
"version": "1.0.30",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -50,8 +50,14 @@ import {log} from "./logger"

socket.onPing(() => {
this.listeners.messageIn("PING")
})
if (this.pingSendTimeout) {
this.pingTimer = setTimeout(this.sendPing, this.pingSendTimeout)
}
socket.onPong(() => {
this.listeners.messageIn("PONG")
socket.onPong(() => {
this.listeners.messageIn("PONG")
if (this.pingSendTimeout) {
if (this.runningCalls[PING_MESSAGE_ID]) {

@@ -63,4 +69,4 @@ this.runningCalls[PING_MESSAGE_ID].resolve()

this.sendCall()
})
}
}
})

@@ -67,0 +73,0 @@ this.callTimeoutTimer = setInterval(() => this.timeoutCalls(), 1000) // every 1s

@@ -1,3 +0,1 @@

import {RpcSession} from "./RpcSession"
export interface Socket {

@@ -9,2 +7,3 @@ onMessage(h: (message: string) => void)

onPong(h: () => void)
onPing(h: () => void)

@@ -11,0 +10,0 @@ terminate()

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