Class AbstractMessageReaderAbstract

Reads JSON-RPC messages from some underlying transport.

Hierarchy (View Summary)

Implements

Constructors

Accessors

  • get onClose(): Event<void>
  • An event raised when the end of the underlying transport has been reached.

    Returns Event<void>

  • get onError(): Event<Error>
  • Raised whenever an error occurs while reading a message.

    Returns Event<Error>

  • get onPartialMessage(): Event<PartialMessageInfo>
  • An event that may be raised to inform the owner that only part of a message has been received. A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received.

    Returns Event<PartialMessageInfo>

Methods

  • Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any.

    Returns void

  • Returns void

  • Parameters

    • error: any

    Returns void

  • Parameters

    Returns void

  • Begins listening for incoming messages. To be called at most once.

    Parameters

    • callback: DataCallback

      A callback for receiving decoded messages.

    Returns Disposable