websockets
Build real-time features with WebSockets: connection lifecycle, protocols, backpressure, scaling, and reconnection. Use for live updates and chat.
原文 · 译文尚未补齐适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- WebSockets
- Quick Start
- When to Use
- Best Practices
- Protocol Design
- Connection Lifecycle
- Backpressure & Flow
- Scaling
Building real-time, bidirectional communication with WebSockets. Live updates (chat, notifications, dashboards) Collaborative editing and presence Streaming data and progress Bidirectional client-server interactions Define message envelopes with a type + payload Version the message protocol Use JSON or a binary format consistently Include correlation/request IDs Handle open, message, close, and error events Implement ping/pong keepalive Detect half-open connections Clean up resources on close Respect slow consumers; don't buffer unbounded Use queues with limits and drop policies Batch high-frequency updates Pause/close on saturation Share state via pub/sub (Redis) across nodes Use sticky sessions or a gateway Reconnect with exponential backoff client-side Handle authentication at handshake 1. Define the message envelope and event types. 2. Set up the server with connection handling. 3. Add keepalive (ping/pong) and reconnection. 4. Implement broadcast and room/scope routing. 5. Add backpressure handling for slow clients. 6. Auth at the handshake (token/cookie). 7. Scale with a pub/sub backbone for multi-node. 8. Monitor connections, messages, and errors. 1. Messages round-trip bidi
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- ssrjkk/agent-skills
- 源文件
- .claude/skills/backend/websockets/SKILL.md
- 固定版本
- 868975614072b553f929cb32c52c5e7dc4ba8734
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:ssrjkk/agent-skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-11T03:01:42.279Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。