Preparing search index...

    Class WebSocketOptions

    Additional settings applied when opening a WebSocket connection with InternetModule#createWebSocket. All fields are optional; unset fields fall back to the connection defaults.

    //@input Asset.InternetModule internetModule
    const options = script.internetModule.createWebSocketOptions();
    options.headers = { "Authorization": `Bearer ${token}` };

    const socket = script.internetModule.createWebSocket("wss://<some-url>", undefined, options);

    Hierarchy (View Summary)

    Index

    Properties

    headers: { [key: string]: string }

    Extra HTTP headers to send on the WebSocket opening handshake, as a map of header name to value. Defaults to an empty set of headers.

    {}
    

    Methods

    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean