holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.04k stars 84 forks source link

Add joinPeer/leavePeer methods to v3 #84

Closed andrewosh closed 2 years ago

andrewosh commented 2 years ago

With join and leave, you can connect to groups of peers swarming around a common topic. Hyperswarm ensures that these peers connections are retried after failures. These methods don't let you specify which peers to connect to.

WIth these new joinPeer and leavePeer methods, you can directly connect to a known peer with a given Noise public key, and Hyperswarm will use the same reconnect logic on the resulting connections.

This PR depends on https://github.com/hyperswarm/hyperswarm/pull/83, so review that first