Socket
Socket
Sign inDemoInstall

mdns

Package Overview
Dependencies
14
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.3 to 2.3.4

22

examples/express_app.js
#!/usr/bin/env node
var mdns = require('../lib/mdns')
, app = express.createServer()
;
,express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('Hello World');
});
try {
var express = require('express');
} catch (e) {
console.log('please install express manualy: npm install express');
}
app.get('/', function() { return "Hello World"; });
app.on('listening', function() {
mdns.createAdvertisement(mdns.tcp('http') , app.address().port ).start();
var listener = app.listen(4321, function() {
var port = listener.address().port;
mdns.createAdvertisement(mdns.tcp('http') , port).start();
console.log('Listening on port', port);
});
app.listen(4321);

@@ -117,3 +117,3 @@ var dns_sd = require('./dns_sd')

var req = new cares.GetAddrInfoReqWrap()
, err = cares.getaddrinfo(req, host, family)
, err = cares.getaddrinfo(req, host, family, 0, false)
;

@@ -120,0 +120,0 @@ req.oncomplete = function oncomplete(err, addresses) {

@@ -50,3 +50,3 @@ var ServiceType = exports.ServiceType = function ServiceType(/* ... */) {

ServiceType.prototype.fromString = function fromString(string) {
var is_wildcard = string === ServiceType.wildcard
var is_wildcard = ServiceType.prototype.isWildcard.call(string)
, subtypes = string.split(',')

@@ -53,0 +53,0 @@ , primary_string = subtypes.shift()

@@ -922,138 +922,2 @@ {

"test": "ok",
"message": "'type' must be ServiceType object"
},
{
"test": "strictEqual",
"message": "'type' must match target type"
},
{
"test": "strictEqual",
"message": "'replyDomain' must be a string"
},
{
"test": "strictEqual",
"message": "'replyDomain' must match 'local.'"
},
{
"test": "strictEqual",
"message": "'fullname' must be a string"
},
{
"test": "strictEqual",
"message": "'host' must be a string"
},
{
"test": "strictEqual",
"message": "'port' must be a number"
},
{
"test": "strictEqual",
"message": "'port' must match"
},
{
"test": "ok",
"message": "'service' must have a addresses property"
},
{
"test": "ok",
"message": "'addresses' must be a string"
},
{
"test": "ok",
"message": "'addresses' must not be empty"
},
{
"test": "ok",
"message": "'service' must have a rawTxtRecord property"
},
{
"test": "ok",
"message": "'rawTxtRecord' must be truthy"
},
{
"test": "ok",
"message": "'txtRecord' must be truthy"
},
{
"test": "strictEqual",
"message": "must have a networkInterface"
},
{
"test": "strictEqual",
"message": "property type in txtRecord must match"
},
{
"test": "strictEqual",
"message": "property chunky in txtRecord must match"
},
{
"test": "strictEqual",
"message": "property strips in txtRecord must match"
},
{
"test": "strictEqual",
"message": "property buffer in txtRecord must match"
},
{
"test": "ok",
"message": "must have context"
},
{
"test": "strictEqual",
"message": "property must match input"
},
{
"test": "strictEqual",
"message": "'flags' must be a number"
},
{
"test": "strictEqual",
"message": "'interfaceIndex' must be a number"
},
{
"test": "strictEqual",
"message": "'name' must be a string"
},
{
"test": "ok",
"message": "'type' must be a service type object"
},
{
"test": "strictEqual",
"message": "type must match the target type"
},
{
"test": "strictEqual",
"message": "'replyDomain' must be a string"
},
{
"test": "strictEqual",
"message": "'replyDomain' must match 'local.'"
},
{
"test": "strictEqual",
"message": "must have a networkInterface"
},
{
"test": "ok",
"message": "must have context"
},
{
"test": "strictEqual",
"message": "property must match input"
},
{
"test": "strictEqual",
"message": "'flags' must be a number"
},
{
"test": "strictEqual",
"message": "'interfaceIndex' must be a number"
},
{
"test": "strictEqual",
"message": "'name' must be a string"
},
{
"test": "ok",
"message": "'type' must be a ServiceType object"

@@ -1084,82 +948,2 @@ },

"message": "property must match input"
},
{
"test": "strictEqual",
"message": "'flags' must be a number"
},
{
"test": "strictEqual",
"message": "'interfaceIndex' must be a number"
},
{
"test": "strictEqual",
"message": "'name' must be a string"
},
{
"test": "ok",
"message": "'type' must be a service type object"
},
{
"test": "strictEqual",
"message": "type must match the target type"
},
{
"test": "strictEqual",
"message": "'replyDomain' must be a string"
},
{
"test": "strictEqual",
"message": "'replyDomain' must match 'local.'"
},
{
"test": "strictEqual",
"message": "must have a networkInterface"
},
{
"test": "ok",
"message": "must have context"
},
{
"test": "strictEqual",
"message": "property must match input"
},
{
"test": "strictEqual",
"message": "'flags' must be a number"
},
{
"test": "strictEqual",
"message": "'interfaceIndex' must be a number"
},
{
"test": "strictEqual",
"message": "'name' must be a string"
},
{
"test": "ok",
"message": "'type' must be a ServiceType object"
},
{
"test": "strictEqual",
"message": "'type' must match target aervice type"
},
{
"test": "strictEqual",
"message": "'replyDomain' must be a string"
},
{
"test": "strictEqual",
"message": "'replyDomain' must match 'local.'"
},
{
"test": "strictEqual",
"message": "must have a networkInterface"
},
{
"test": "ok",
"message": "must have context"
},
{
"test": "strictEqual",
"message": "property must match input"
}

@@ -1231,14 +1015,2 @@ ],

{
"test": "ok",
"message": "'service' must have a rawTxtRecord property"
},
{
"test": "ok",
"message": "'rawTxtRecord' must be truthy"
},
{
"test": "ok",
"message": "'txtRecord' must be truthy"
},
{
"test": "strictEqual",

@@ -1252,18 +1024,2 @@ "message": "'txtRecord' doesn't match"

"test": "ok",
"message": "'service' must have a rawTxtRecord property"
},
{
"test": "ok",
"message": "'rawTxtRecord' must be truthy"
},
{
"test": "ok",
"message": "'txtRecord' must be truthy"
},
{
"test": "strictEqual",
"message": "'txtRecord' doesn't match"
},
{
"test": "ok",
"message": "service must not have a 'host' property"

@@ -1270,0 +1026,0 @@ },

{ "name": "mdns"
, "version": "2.3.3"
, "version": "2.3.4"
, "description": "multicast DNS service discovery"

@@ -33,3 +33,3 @@ , "main": "./lib/mdns.js"

{ "name": "David Siegel"
, "email": "david@artcom.de"
, "email": "agnat@me.com"
, "github": "agnat"

@@ -36,0 +36,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc