🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

websocket-pro-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-pro-client

High-performance WebSocket client with auto-reconnect, heartbeat and priority messaging

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
-80%
Maintainers
1
Weekly downloads
 
Created
Source

WebSocket Pro Client

npm version test coverage

高性能 WebSocket 客户端,专为现代 Web 应用设计。

特性

  • 🚀 自动重连 + 智能退避算法
  • 💓 可配置心跳检测
  • 🎯 消息优先级调度
  • 📦 多连接池管理
  • 🔍 完整的 TypeScript 支持

安装

npm install websocket-pro-client
# 或
yarn add websocket-pro-client

快速开始

import { createWebSocketManager } from "websocket-pro-client";

const manager = createWebSocketManager({
  maxReconnectAttempts: 5,
});

const client = manager.connect("wss://api.example.com");

client.on("message", (data) => {
  console.log("Received:", data);
});

client.send({ action: "subscribe" });

开发调试

# 启动测试
npm test

# 构建库
npm run build

# 运行demo
npm run demo

贡献指南

  • Fork 仓库
  • 创建特性分支 (git checkout -b dev/feature/fix-xxx)
  • 提交更改 (git commit -am 'feat/fix xxx')
  • 推送到分支 (git push origin dev/feature/fix-xxx)
  • 创建 Pull Request

许可证

MIT © 2023 BetaCatPro

Keywords

websocket

FAQs

Package last updated on 10 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts