jsf.js_next_gen
    Preparing search index...

    Function init

    • Parameters

      • socketClientId: string

        the sockets client identifier

      • url: string

        the uri to reach the socket

      • channel: string

        the channel name/id

      • onopen: string | OnOpenHandler | null

        The function to be invoked when the web socket is opened.

      • onmessage: string | OnMessageHandler | null

        The function to be invoked when a message is received.

      • onerror: string | OnErrorHandler | null

        The function to be invoked when an error occurs.

      • onclose: string | OnCloseHandler | null

        The function to be invoked when the web socket is closed.

      • behaviors: Record<string, (() => void)[]>

        functions which are invoked whenever a message is received

      • autoConnect: boolean

        Whether or not to automatically open the socket. Defaults to false.

      Returns void