Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jun 5, 2018
1 parent d3eeb6e commit 02eea97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libp2p-mdns JavaScript implementation
```JavaScript
const MDNS = require('libp2p-mdns')

const mdns = new MDNS(peerInfo, options)
const mdns = new MDNS(options)

mdns.on('peer', (peerInfo) => {
console.log('Found a peer in the local network', peerInfo.id.toB58String())
Expand All @@ -28,9 +28,10 @@ mdns.start(() => setTimeout(() => mdns.stop(() => {}), 20 * 1000))
```

- options
- `peerInfo` - PeerInfo to announce
- `broadcast` - (true/false) announce our presence through mDNS, default false
- `interval` - query interval, default 10 * 1000 (10 seconds)
- `serviceTag` - name of the service announcedm, default 'ipfs.local`
- `serviceTag` - name of the service announce , default 'ipfs.local`

# MDNS messages

Expand Down

0 comments on commit 02eea97

Please sign in to comment.