Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/bonjour/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/bonjour/index.js
'use strict'

var Registry = require('./lib/registry')
var Server = require('./lib/mdns-server')
var Browser = require('./lib/browser')

module.exports = Bonjour

function Bonjour (opts) {
  if (!(this instanceof Bonjour)) return new Bonjour(opts)
  this._server = new Server(opts)
  this._registry = new Registry(this._server)
}

Bonjour.prototype.publish = function (opts) {
  return this._registry.publish(opts)
}

Bonjour.prototype.unpublishAll = function (cb) {
  this._registry.unpublishAll(cb)
}

Bonjour.prototype.find = function (opts, onup) {
  return new Browser(this._server.mdns, opts, onup)
}

Bonjour.prototype.findOne = function (opts, cb) {
  var browser = new Browser(this._server.mdns, opts)
  browser.once('up', function (service) {
    browser.stop()
    if (cb) cb(service)
  })
  return browser
}

Bonjour.prototype.destroy = function () {
  this._registry.destroy()
  this._server.mdns.destroy()
}

Spamworldpro Mini