@stricahq/ouroboros-network-js - v2.0.0
    Preparing search index...

    Class MiniProtocol<S, M, R>Abstract

    One mini protocol over the mux. Outgoing messages are framed into segments and written to the transport, incoming segment payloads are decoded into messages and handed to parse, and the protocol's state machine is kept along the way: a request the state does not allow is refused before it is sent, and a message the node may not send, or one that does not parse, is reported as an error event and drops the connection.

    Type Parameters

    • S extends string
    • M extends string
    • R

    Hierarchy (View Summary)

    Index
    • Type Parameters

      • S extends string
      • M extends string
      • R

      Parameters

      Returns MiniProtocol<S, M, R>

    • get agency(): Agency

      Whose turn it is to send in the current state.

      Returns Agency

    • get state(): S

      The protocol's current state.

      Returns S