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

Commit

Permalink
feat: Use latest multicast-dns and dns-packet (#69)
Browse files Browse the repository at this point in the history
* fix: use latest multicast-dns and dns-packet

* chore: multicast-dns 7.0.0 released
  • Loading branch information
richardschneider authored and daviddias committed Feb 13, 2018
1 parent fa8fe22 commit cb69f2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"libp2p-tcp": "~0.11.2",
"multiaddr": "^3.0.2",
"multicast-dns": "^6.2.3",
"multicast-dns": "^7.0.0",
"peer-id": "~0.10.5",
"peer-info": "~0.11.6"
},
Expand Down
12 changes: 6 additions & 6 deletions src/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = {
return
}

const b58Id = answers.txt.data.toString()
const b58Id = answers.txt.data[0].toString()
const port = answers.srv.data.port
const multiaddrs = []

Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = {
answers.push({
name: serviceTag,
type: 'PTR',
class: 1,
class: 'IN',
ttl: 120,
data: peerInfo.id.toB58String() + '.' + serviceTag
})
Expand All @@ -107,7 +107,7 @@ module.exports = {
answers.push({
name: peerInfo.id.toB58String() + '.' + serviceTag,
type: 'SRV',
class: 1,
class: 'IN',
ttl: 120,
data: {
priority: 10,
Expand All @@ -120,7 +120,7 @@ module.exports = {
answers.push({
name: peerInfo.id.toB58String() + '.' + serviceTag,
type: 'TXT',
class: 1,
class: 'IN',
ttl: 120,
data: peerInfo.id.toB58String()
})
Expand All @@ -130,7 +130,7 @@ module.exports = {
answers.push({
name: os.hostname(),
type: 'A',
class: 1,
class: 'IN',
ttl: 120,
data: ma.toString().split('/')[2]
})
Expand All @@ -140,7 +140,7 @@ module.exports = {
answers.push({
name: os.hostname(),
type: 'AAAA',
class: 1,
class: 'IN',
ttl: 120,
data: ma.toString().split('/')[2]
})
Expand Down

0 comments on commit cb69f2f

Please sign in to comment.