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

websocket-front

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-front - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

package.json
{
"name": "websocket-front",
"version": "1.0.7",
"version": "1.0.8",
"description": "WebSocket client for browser with reconnect and heartbeat",

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

@@ -85,12 +85,12 @@ # websocket-front

| 名称 | 类型 | 描述 | 默认值 |
| ---------------- | -------- | -------------------------------- | -------- |
| isReconnect | boolean | 是否需要自动重连 | true |
| reconnectTimeout | number | 自动重连间隔时间 | 300ms |
| reconnectRepeat | number | 尝试自动重连的次数 | Infinity |
| isHeartbeat | boolean | 是否支持心跳检测 | 是 |
| pingMsg | string | 心跳检测发送给后端的消息 | 'ping' |
| pingTimeout | number | 发送心跳检测消息的延迟时间 | 30s |
| pongTimeout | number | 多长时间没有收到返回的心跳就重启 | 300ms |
| protocols | string[] | 指定子协议 | [] |
| 名称 | 类型 | 描述 | 默认值 |
| ---------------- | -------- | -------------------------------- | ------ |
| isReconnect | boolean | 是否需要自动重连 | true |
| reconnectTimeout | number | 自动重连间隔时间 | 300ms |
| reconnectRepeat | number | 尝试自动重连的次数 | 3 |
| isHeartbeat | boolean | 是否支持心跳检测 | 是 |
| pingMsg | string | 心跳检测发送给后端的消息 | 'ping' |
| pingTimeout | number | 发送心跳检测消息的延迟时间 | 30s |
| pongTimeout | number | 多长时间没有收到返回的心跳就重启 | 300ms |
| protocols | string[] | 指定子协议 | [] |

@@ -97,0 +97,0 @@ ### 事件

@@ -57,3 +57,3 @@ interface EventParams {

reconnectTimeout: options?.reconnectTimeout ?? 300, // 重连的时间间隔,默认300毫秒
reconnectRepeat: options?.reconnectRepeat ?? Infinity,
reconnectRepeat: options?.reconnectRepeat ?? 3, // 重连次数,默认3,如果是Infinity 则为无数次
isHeartbeat: options?.isHeartbeat ?? true,

@@ -60,0 +60,0 @@ pingMsg: options?.pingMsg ?? "ping",

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