libp2p / js-libp2p-mdns

libp2p MulticastDNS Peer Discovery
https://libp2p.io
Other
51 stars 17 forks source link

feat: compatibility with go-libp2p-mdns - option 2 #81

Closed alanshaw closed 5 years ago

alanshaw commented 5 years ago

This PR simply sends out a multicast "response" on an interval in a format that go-libp2p-mdns expects. This works because go-libp2p sends a multicast query every 5 seconds and waits for responses to come in. Although they ideally should be sent unicast, go-libp2p still accepts multicast responses.

Note this allows go-libp2p to discover js-libp2p nodes but not the other way around.