Closed bltavares closed 3 years ago
We are producing a new peer without telling the code that would use it which public_key was used on this process. This is part leftover of the fact that each mdns-discovery handled a single feed.
We should return a tuple at least with peer address and public_key
The mdns stack has no knowledge of the public key, as it only deals with discovery_keys. It has been refactored to return (DiscoveryKey, Peer IP)
now
This commit allow us to add and remove feed itens from the mDNS discovery stack.
We are not capable of integrating with @Frando's
hypercore-replicator
, which should let us introduce new discovery feeds when looking on mdns.The binary example tests that we can still have a stream of items, and that we can add and remove topics in the background.
Ideally, we could later move into the "subscribers" direction, instead of a single stream, similar to how @Frando is doing on the
hyperspace
code. So we can avoid wrapping things on aArc<RwLock<_>>
.TODO: Refactor Hyperstack - possibly using
hypercore-replicator
and move out thehyperdrive
into it's own crate.Closes #22