npm install seaport-mdns
seaport-mdns listen -p 5000
``js
var seaport = require('seaport-mdns')
seaport.find(function(ports) {
ports.query(function(ps) {
console.log(ps)
})
})
`
The lib has the same api as a seaport with the following additions.
Creates a browser and call the callback with the first seaport server it finds. If options.name is set, will it only callback when it finds a seaport server that matches the specified name.
Creates an instance of seaport.Browser
- mdns info object
Emitted when a seaport server goes online
- mdns info object
Emitted when a seaport servers goes offline
Start browsing
Stop browsing
Calls the listen` method on the seaport server and creates and mdns advertisement.
To get the seaport mdns library, with npm do:
npm install seaport-mdns
To get the seaport-mdns command, do:
npm install -g seaport-mdns
MIT