libp2p/protocols/pubsub/floodsub

    Dark Mode
Search:
Group by:
  Source   Edit

Simple flood-based publishing.

Types

FloodSub {.public.} = ref object of PubSub
  floodsub*: PeerTable
  seen*: TimedCache[MessageID]
  seenSalt*: seq[byte]
  Source   Edit

Consts

FloodSubCodec = "/floodsub/1.0.0"
  Source   Edit

Procs

proc addSeen(f: FloodSub; msgId: MessageID): bool {....raises: [Defect], tags: [].}
  Source   Edit
proc handleSubscribe(f: FloodSub; peer: PubSubPeer; topic: string;
                     subscribe: bool) {....raises: [Defect],
                                        tags: [WriteIOEffect, TimeEffect].}
  Source   Edit
proc hasSeen(f: FloodSub; msgId: MessageID): bool {....raises: [Defect], tags: [].}
  Source   Edit

Methods

method unsubscribePeer(f: FloodSub; peer: PeerId) {....raises: [Defect],
    tags: [RootEffect].}
handle peer disconnects   Source   Edit