Skip to main content
  • Snap

snap_getWebSockets

Description

Get the connected WebSockets for the Snap.

Returns

{ id: string; url: string; protocols: string[] }[]

An array of connected WebSockets for the Snap. Each WebSocket is represented by an object containing the following properties:

  • id - The unique identifier of the WebSocket connection.
  • url - The URL of the WebSocket connection.
  • protocols - An array of subprotocols used in the WebSocket connection (if any).