Skip to main content
WebSocket V2 commands provide a more powerful, event-driven alternative to the basic WebSocket commands. They support long-running connections with hooks for connection, message, error, and close events. Multiple protocol variants are supported: native, SignalR, SignalR-legacy, and Socket.IO.

Overview

WebSocket V2 commands provide functionality for:
  • Long-running WebSocket connections with configurable event hooks
  • SignalR, Socket.IO, and native protocol support
  • Decode of SignalR/LZ4/gzip payloads
  • Clean connection teardown

Available Commands

WebSocket V2

Long-running WebSocket with full event-hook support

WebSocket V2 Send

Send a message over the active WS V2 connection

Decode (WS V2)

Decode base64+LZ4 or base64+gzip payloads (e.g., SignalR)

WebSocket V2 Close

Cleanly close the active WS V2 connection

Common Use Cases

  • SignalR Feeds: Subscribe to SignalR hubs for live data streams
  • Socket.IO Integration: Connect to Socket.IO servers and subscribe to events
  • Long-Running Connections: Maintain connections that receive many messages over time
  • Heartbeat Patterns: Use onInterval to send periodic heartbeat messages