multicast-dns
Advanced tools
Comparing version 2.1.1 to 2.2.0
11
index.js
@@ -12,11 +12,16 @@ var packets = require('./packets') | ||
var that = new events.EventEmitter() | ||
var ip = opts.ip || opts.host || '224.0.0.251' | ||
var port = opts.port || 5353 | ||
var type = opts.type || 'udp4' | ||
var ip = opts.ip || opts.host || (type === 'udp4' ? '224.0.0.251' : null) | ||
if (type === 'udp6' && (!ip || !opts.interface)) { | ||
throw new Error('For IPv6 multicast you must specify `ip` and `interface`') | ||
} | ||
var bind = thunky(function (cb) { | ||
var socket = dgram.createSocket({ | ||
type: 'udp4', | ||
type: type, | ||
reuseAddr: opts.reuseAddr !== false, | ||
toString: function () { | ||
return 'udp4' | ||
return type | ||
} | ||
@@ -23,0 +28,0 @@ }) |
{ | ||
"name": "multicast-dns", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "Low level multicast-dns implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26590
662