Peer List
@alias module:net.PeerList
@constructor
@param {Object} options
503886
function PeerList() {
  this.map = new Map();
  this.ids = new Map();
  this.list = new List();
  this.load = null;
  this.inbound = 0;
  this.outbound = 0;
}
369002
function list(req, res) {
  var s = '';
  this.state.connections.forEach(function(conn) {
    s += conn.toString();
  })
  res.send(null, s);
}
629757
function createListing(config, listingData) {
  const options = {
    method: "POST",
    uri: `${config.obServer}:${config.obPort}/ob/listing/`,
    body: listingData,
    json: true, // Automatically stringifies the body to JSON
    headers: {
      Authorization: config.apiCredentials,
    },
  };

  return rp(options);
}
1334273
function Server(options) {
  var that = this;
  that.options = options || {};
  that.stack = [];
  bind.call(that);
}
299828
function PrivacyListProxy(options) {
    this.service = options.service;
    this.helpers = options.helpers;
    this.connection = options.stropheClient;
    this.Client = options.xmppClient;
    this.nodeStanzasCallbacks = options.nodeStanzasCallbacks;
}
1054795
function(options, parentNode) {
	options = options || {};
	objects.mixin(this, options);

	this.options = options;
	this.checkOptions(this.options, ["serviceRegistry", "fileClient", "siteClient", "commandService", "statusService", "progressService"]); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

	this._fileClient = this.options.fileClient;
	this._siteClient = this.options.siteClient;
	this._commandService = this.options.commandService;
	this._statusService = this.options.statusService;
	this._progressService = this.options.progressService;

	this._commandsContainer = this.options.commandsContainer;

	if (this.options.location) {
		this.load(this.options.location);
	}

	this.node = parentNode || document.createElement("div"); //$NON-NLS-0$
}
911675
function(options) 
	{
		this.addEventListener(conbo.ConboEvent.CHANGE, this.__changeHandler, this, 999);
		
		var listOptions = ['itemClass'];
		
		conbo.assign(this, conbo.pick(options, listOptions));
		
		this.source = options.source || [];
	}
735397
function HttpsProxyingAgent(options) {
  options.tunnel = true;
  ProxyingAgent.call(this, options, https.Agent);
}
516599
function list(options) {
  return function (req, res) {
    let list,
      listOptions = _.assign({
        prefix: req.uri,
        values: false
      }, options);

    list = db.list(listOptions);

    res.set('Content-Type', 'application/json');
    list.pipe(res);
  };
}
376750
function joinAdjacentLists(opts: Options, node: Node): void | Normalizer {
    if (node.object !== 'document' && node.object !== 'block') {
        return undefined;
    }

    const invalids = node.nodes
        .map((child, i) => {
            if (!isList(opts, child)) return null;
            const next = node.nodes.get(i + 1);
            if (!next || !isList(opts, next) || !opts.canMerge(child, next)) {
                return null;
            }

            return [child, next];
        })
        .filter(Boolean);

    if (invalids.isEmpty()) {
        return undefined;
    }

    /**
     * Join the list pairs
     */
    // We join in reverse order, so that multiple lists folds onto the first one
    return change => {
        invalids.reverse().forEach(pair => {
            const [first, second] = pair;
            const updatedSecond = change.value.document.getDescendant(
                second.key
            );
            updatedSecond.nodes.forEach((secondNode, index) => {
                change.moveNodeByKey(
                    secondNode.key,
                    first.key,
                    first.nodes.size + index,
                    { normalize: false }
                );
            });

            change.removeNodeByKey(second.key, { normalize: false });
        });
    };
}
1111616
def list_option(name, description, **config)
      add_option Clin::OptionList.new(name, description, **config)
    end
142658
def peer(opt_peer, opt_username, opt_password, scope="module"):
    ''''''
    p = BigIP(opt_peer, opt_username, opt_password)
    return p
695687
function HTTPServer(options) {
  if (!(this instanceof HTTPServer))
    return new HTTPServer(options);

  options = new HTTPOptions(options);

  HTTPBase.call(this, options);

  this.options = options;
  this.network = this.options.network;
  this.logger = this.options.logger.context('http');
  this.node = this.options.node;

  this.chain = this.node.chain;
  this.mempool = this.node.mempool;
  this.pool = this.node.pool;
  this.fees = this.node.fees;
  this.miner = this.node.miner;
  this.rpc = this.node.rpc;

  this.init();
}
799911
def list(options)
      file = File.open(FILE_PATH, 'a+')
      servers = all_hosts_in(file)
      file.close
      if servers.empty?
        PRINTER.print 'No aliases added'
      else
        PRINTER.print 'Listing aliases:'
        servers.each{|x| PRINTER.print "\t- #{x}"}
      end
      finish_exec
    end
823186
function addPeer( sPeer )
{
	if ( assocKnownPeers[ sPeer ] )
	{
		return;
	}

	//
	//	save to memory
	//
	assocKnownPeers[ sPeer ] = true;

	//
	//	save to local storage
	//
	let sHost = getHostByPeer( sPeer );
	addPeerHost
	(
		sHost,
		() =>
		{
			console.log( "will insert peer " + sPeer );
			db.query( "INSERT " + db.getIgnore() + " INTO peers (peer_host, peer) VALUES (?,?)", [ sHost, sPeer ] );
		}
	);
}
1299130
async function installPeerDependencies(cwd, installDir, options) {
  const { data: pkg } = await joycon.load({
    files: ['package.json'], cwd
  })
  const peers = pkg.peerDependencies || {}

  const packages = []
  for (const peer in peers) {
    if (!options.peerFilter || options.peerFilter(peer, peers[peer])) {
      packages.push(`${peer}@${peers[peer]}`)
    }
  }

  if (packages.length > 0) {
    await install(
      Object.assign({}, options, {
        packages,
        cwd: installDir,
        installPeers: false
      })
    )
  }
}
648818
function isList(opts: Options, node: Node): boolean {
    return opts.types.includes(node.type);
}