@open-rpc/client-js
    Preparing search index...

    Class WebSocketTransport

    Hierarchy

    • Transport
      • WebSocketTransport
    Index

    Constructors

    Properties

    connection: WebSocket
    transportRequestManager: TransportRequestManager
    uri: string

    Methods

    • Parameters

      • data: JSONRPCRequestData

      Returns
          | IJSONRPCRequest
          | IJSONRPCNotification
          | (IJSONRPCRequest | IJSONRPCNotification)[]

    • Parameters

      • data: JSONRPCRequestData
      • timeout: null | number = 5000

      Returns Promise<any>

    • Parameters

      • event: keyof ITransportEvents
      • handler:
            | ((data: JSONRPCError) => void)
            | ((data: JSONRPCRequestData) => void)
            | ((data: IJSONRPCNotificationResponse) => void)
            | ((data: IJSONRPCResponse) => void)

      Returns void

    • Parameters

      • Optionalevent: keyof ITransportEvents
      • Optionalhandler:
            | ((data: JSONRPCError) => void)
            | ((data: JSONRPCRequestData) => void)
            | ((data: IJSONRPCNotificationResponse) => void)
            | ((data: IJSONRPCResponse) => void)

      Returns undefined | EventEmitter<DefaultEventMap>