hyperswarm / discovery

The Hyperswarm discovery stack
MIT License
121 stars 16 forks source link

emit peers that announce themselves #12

Closed indutny closed 5 years ago

indutny commented 5 years ago

The announcements from other peers can be treated as discovery of those peers, even if they happen outside of the DHT loop. This is especially relevant given the timing of the loop iteration (5-10 minutes).

Another motivation could be duplicate detection logic. To prevent duplicate peers from reconnecting either server or client could mark the peer with info.reconnect(false) in hyperswarm. For the discovery this means that only the side with info.reconnect(true) can re-establish the connection. Detecting re-appearance of the remote peer eagerly should speed up the connection and avoid long wait times.

indutny commented 5 years ago

As discussed on IRC, there is little point in this change. Closing.