@nats-io/nats-core
    Preparing search index...

    Type Alias WsSocketFactory

    WsSocketFactory: (
        u: string,
        opts: ConnectionOptions,
    ) => Promise<{ encrypted: boolean; socket: WebSocket }>

    WsSocketFactory is a factory that returns a WebSocket and a boolean indicating if the connection is encrypted. Client code is responsible for creating a W3C WebSocket compliant transport.

    Type declaration

      • (
            u: string,
            opts: ConnectionOptions,
        ): Promise<{ encrypted: boolean; socket: WebSocket }>
      • Parameters

        Returns Promise<{ encrypted: boolean; socket: WebSocket }>

        a promise that resolves to a WebSocket and a boolean indicating if the connection is encrypted