0.3.0 • Published 9 years ago
ipfs-mdns v0.3.0
node-ipfs-mdns
Node.js IPFS mDNS discovery implementation
Usage
var Sonar = require('ipfs-mdns')
var snr = new Sonar(peer, options, swarm)
snr.on('peer', function (peerFound) {
console.log('Found a local peer', peerFound.id.toB58String())
})
- peer - The peer that represents itself. Must be of a type ipfs-peer
- swarm - swarm, needed in order to verify if we are able to establish a connection with the other peer
- options
broadcast
- (true/false) announce our presence through mDNSinterval
- query intervalserviceTag
- name of the service announced (default to "discovery.ipfs.io.local")verify
- Verifies if we can establish a connection with the peer, before emitting apeer
event