This package has been deprecated

Author message:

use libp2p-mdns instead

libp2p-mdns-discovery

0.3.3 • Public • Published

libp2p-mdns-discovery JavaScript Implementation

Node.js libp2p mDNS discovery implementation

Usage

var Sonar = require('libp2p-mdns-discovery')

var snr = new Sonar(peer, options, swarm)

snr.on('peer', function (peerInfo) {
  console.log('Found a peer in the local network', peerFound.id.toB58String())
})
  • peer - The peer that represents itself. Must be of a type peer-info
  • 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 mDNS
    • interval - query interval
    • serviceTag - name of the service announced (default to "discovery.ipfs.io.local")
    • verify - Verifies if we can establish a connection with the peer, before emitting a peer event

Readme

Keywords

Package Sidebar

Install

npm i libp2p-mdns-discovery

Weekly Downloads

1

Version

0.3.3

License

MIT

Last publish

Collaborators

  • daviddias