Class SyncpsPubsub

syncps - pubsub service.

Hierarchy

  • TypedEventTarget<EventMap>
    • SyncpsPubsub

Implements

Constructors

Properties

Methods

Constructors

Properties

describe: string

Methods

  • Stop the protocol operation.

    Returns void

  • Publish a packet.

    Parameters

    • pub: Data

      Data packet. This does not need to be signed.

    • Optional cb: SyncpsPubsub.PublishCallback

      Callback to get notified whether publication is confirmed, i.e. its hash appears in a sync Interest from another participant.

    Returns Promise<void>

    • Promise that resolves when the publication is recorded. It does not mean the publication has reached other participants.