Eventstream RPC client - uses an underlying eventstream connection to implement the eventstream RPC protocol

Hierarchy

  • EventEmitter
    • RpcClient

Methods

  • Shuts down the client and begins the process of release all native resources associated with the client and in-progress operations. It is critical that this function be called when finished with the client; otherwise, native resources will leak.

    The client tracks unclosed operations and, as part of this process, closes them as well.

    Returns Promise<void>

  • Attempts to open a network connection to the configured remote endpoint. Returned promise will be fulfilled if the transport-level connection is successfully established and the eventstream handshake completes without error.

    Returns a promise that is resolved with additional context on a successful connection, otherwise rejected.

    connect() may only be called once.

    Parameters

    Returns Promise<SuccessfulConnectionResult>

  • Returns true if the connection is currently open and ready-to-use, false otherwise.

    Returns boolean

  • Factory method to create a new client

    Parameters

    • config: RpcClientConfig

      configuration options that the new client must use

      Returns a new client on success, otherwise throws an RpcError

    Returns RpcClient

Events

DISCONNECTION: string = 'disconnection'

Event emitted when the client's underlying network connection is ended. Only emitted if the connection was previously successfully established, including a successful connect/connack handshake.

Listener type: DisconnectionListener

Generated using TypeDoc