You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use PubSub. But there is no example out there.
(def (start-pubsub-node host-addresses)
(let* ((c (open-libp2p-client host-addresses: host-addresses options: ["-pubsub" "-pubsubRouter" "gossipsub"] wait: 20))
(self (libp2p-identify c)))
(pubsub-subscribe c "Never")
(for (p (peer-info->string* self))
(displayln "I am " p))
(displayln "Listening for incoming connections")))
(def (start-pubsub-node host-addresses)
(let* ((c (open-libp2p-client host-addresses: host-addresses options: ["-pubsub" "-pubsubRouter" "gossipsub"] wait: 20))
(self (libp2p-identify c)))
(pubsub-subscribe c "Never")
(for (p (peer-info->string* self))
(displayln "I am " p))
(libp2p-connect c peer)
(displayln "Listening for incoming connections")))
I also noticed that there is a channel out there.
(pubsub-subscribe c topic)
c := client
topic: = string
=> (values sub cancel)
sub := channel; message channel
cancel := lambda (); thunk to cancel the subscription
message := (vector ID data seqno topics signature key)
How can I use it?
The text was updated successfully, but these errors were encountered:
I would like to use PubSub. But there is no example out there.
I also noticed that there is a channel out there.
How can I use it?
The text was updated successfully, but these errors were encountered: