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

websocket-heartbeat-js

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

websocket-heartbeat-js - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

19

CHANGELOG.md
<a name="1.0.8"></a>
## 1.0.8 (2020-02-22)
### Bug Fixes
* after closed, send message bug ([d9f4850](https://github.com/zimv/websocket-heartbeat-js/commit/d9f4850))
* manual close need to over heartbeat ([07b8dd7](https://github.com/zimv/websocket-heartbeat-js/commit/07b8dd7))
* update unit test ([9619c4e](https://github.com/zimv/websocket-heartbeat-js/commit/9619c4e))
### Features
* add a limit to the times of reconnection ([75c60af](https://github.com/zimv/websocket-heartbeat-js/commit/75c60af))
* demo ([3070b96](https://github.com/zimv/websocket-heartbeat-js/commit/3070b96))
* webpack & lib ([e1514e7](https://github.com/zimv/websocket-heartbeat-js/commit/e1514e7))
<a name="1.0.8"></a>
## 1.0.8 (2019-04-09)

@@ -3,0 +22,0 @@

2

package.json
{
"name": "websocket-heartbeat-js",
"version": "1.0.8",
"version": "1.0.9",
"description": "websocket heartbeat",

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

@@ -19,5 +19,5 @@ [![Build Status](https://travis-ci.org/zimv/websocket-heartbeat-js.svg?branch=master)](https://travis-ci.org/zimv/websocket-heartbeat-js)

Back-end **websocket** service is likely to happen error, when **websocket** disconnected that front-end not notice message received. So need to send ping message by timeout. Server return pong message to client when server received ping message. Becase received pong message, client know connection normal. If client not received pong message, it is connection abnormal, client will reconnect.
Back-end **websocket** service is likely to happen error, when **websocket** disconnected that front-end not notice message received. So need to send ping message by timeout. Server return pong message to client when server received ping message. Because received pong message, client know connection normal. If client not received pong message, it is connection abnormal, client will reconnect.
In summary, for solve above two problem. Client should initiative send ping message for check connect status.
In summary, for solve above two problems. Client should initiative send ping message for check connect status.

@@ -87,2 +87,3 @@ ## How

const options = {

@@ -144,4 +145,12 @@ url: 'ws://xxxx',

## similar package
[websocket-heartbeat-miniprogram][4]
[1]: https://www.cnblogs.com/1wen/p/12302973.html
[1]: https://github.com/zimv/websocket-heartbeat-js/blob/master/README-zh.md
[2]: http://htmlpreview.github.io/?https://github.com/zimv/websocket-heartbeat-js/blob/master/demo/index.html
[3]: http://www.cnblogs.com/1wen/p/5808276.html
[3]: http://www.cnblogs.com/1wen/p/5808276.html
[4]: https://github.com/zimv/websocket-heartbeat-miniprogram
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