Add a client to the list, and manage its life-cycle.
762310
function add(client) {
  // Auto-remove clients on close
  client.once('closed', function() {
    remove(client);
  });

  clients = clients || [];
  clients.push(client);
  initClient(client);
}
970500
def call_openers(self, client, clients_list):
        
        for func in self.openers:
            func(client, clients_list)
383850
def add(self, member):
        
        return self._client.sadd(self.key_prefix, self._dumps(member))
1228657
def add_actor(self, actor):
        """"""
        if _debug: UDPDirector._debug("add_actor %r", actor)

        self.peers[actor.peer] = actor

        # tell the ASE there is a new client
        if self.serviceElement:
            self.sap_request(add_actor=actor)
1277577
def _on_client_connect(self, data):
        """"""
        client = None
        if data.get('id') in self._clients:
            client = self._clients[data.get('id')]
            client.update_connected(True)
        else:
            client = Snapclient(self, data.get('client'))
            self._clients[data.get('id')] = client
            if self._new_client_callback_func and callable(self._new_client_callback_func):
                self._new_client_callback_func(client)
        _LOGGER.info('client %s connected', client.friendly_name)
759930
def client_list_entries_multi_project(
    client, to_delete
):  # pylint: disable=unused-argument
    """"""

    # [START client_list_entries_multi_project]
    PROJECT_IDS = ["one-project", "another-project"]
    for entry in client.list_entries(project_ids=PROJECT_IDS):  # API call(s)
        do_something_with(entry)
1254686
def release_client(self, cb):
        
        cb.stop_using()
        self._q.put(cb, True)
478150
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            self._queue.push(session)
489160
def add(self, priority, observer, callble):
        
        #if observer is not None:
        ins = 0
        for pr, _, _ in self:
            if priority > pr:
                break
            ins += 1
        self._poc.insert(ins, (priority, weakref.ref(observer), callble))
822229
function add(changeList, property, index, values) {
        changeList.push({
            type:'add',
            path: property,
            index: index,
            vals: values
        })
    }
746172
def release_client(self, cb):
        
        if cb:
            self._q.put(cb, True)
            self._clients_in_use -= 1
103394
function addMembers(list, obj) {
		var keys = Object.keys(obj || {});

		for (var i = 0; i < keys.length; i++) {
			list.push({
				owner: obj,
				key: keys[i],
				value: obj[keys[i]]
			});
		}
	}
89888
def add(self, requester: discord.User, track: Track):
        
        track.requester = requester
        self.queue.append(track)
1068049
def addBrokerList(self, aBrokerInfoList):
        """"""
        self.clusterAvailable.update(set(aBrokerInfoList))

        # If we need another connection to a fellow broker
        # TODO: only connect to a given number
        for aBrokerInfo in aBrokerInfoList:
            self.clusterSocket.connect(
                "tcp://{hostname}:{port}".format(
                    hostname=aBrokerInfo.hostname,
                    port=aBrokerInfo.task_port,
                )
            )
            self.cluster.append(aBrokerInfo)
357300
def _on_client_name_changed(self, data):
        """"""
        self._clients.get(data.get('id')).update_name(data)
1055856
def start(self):
        
        logger.info('Starting client.')

        self.dispatcher_greenlets = []

        for _, entry in self.config['baits'].items():
            for b in clientbase.ClientBase.__subclasses__():
                bait_name = b.__name__.lower()
                # if the bait has a entry in the config we consider the bait enabled
                if bait_name in entry:
                    bait_options = entry[bait_name]
                    dispatcher = BaitDispatcher(b, bait_options)
                    dispatcher.start()
                    self.dispatcher_greenlets.append(dispatcher)
                    logger.info('Adding {0} bait'.format(bait_name))
                    logger.debug('Bait added with options: {0}'.format(bait_options))

        gevent.joinall(self.dispatcher_greenlets)
945040
def extend(self, other):
        """"""
        index = len(self)
        length = 0
        for length, element in enumerate(other, 1):
            super(ObservableList, self).append(element)
        if length:
            self._notify_add_at(index, length)