hammerspoon2-docs
    Preparing search index...

    Function openWebSocket

    • Open a WebSocket connection to the given URL. The connection begins immediately. Use the returned object's chainable setter methods to register event callbacks. The connection is automatically closed when hs.reload() is called or the engine shuts down.

      Parameters

      • url: string

        The WebSocket URL (ws:// or wss://).

      Returns HSWebSocket | null

      An HSWebSocket object, or null if the URL is invalid.