Pauses all the snippet clients under management.

        This clears the host port of a client because a new port will be
        allocated in `resume`.
350923
def pause(self):
        
        for client in self._snippet_clients.values():
            self._device.log.debug(
                'Clearing host port %d of SnippetClient<%s>.',
                client.host_port, client.package)
            client.clear_host_port()
55173
def shutdown(self):
        '''
        
        '''
        for item in self.clients:
            client, address = item
            client.close()
            self.clients.remove(item)
1316716
def remove_snippet_client(self, name):
        
        if name not in self._snippet_clients:
            raise Error(self._device, MISSING_SNIPPET_CLIENT_MSG % name)
        client = self._snippet_clients.pop(name)
        client.stop_app()
193675
def _resume_sm(self, remote_ctr):
        
        self._logger.info("resuming SM stream with remote_ctr=%d", remote_ctr)
        # remove any acked stanzas
        self.sm_ack(remote_ctr)
        # reinsert the remaining stanzas
        for token in self._sm_unacked_list:
            self._active_queue.putleft_nowait(token)
        self._sm_unacked_list.clear()
1698
def cleanup(self):
        

        while self.inactive_timeout > 0:
            self.time = time.time()

            keys = []

            for key, client in self.clients.items.items():
                t = getattr(client, "active_at", 0)
                if t > 0 and self.time - t > self.inactive_timeout:
                    client.kwargs["link"].disconnect()
                    keys.append(key)

            for key in keys:
                self.log_debug("Removing client (inactive): %s" % key)
                del self.clients[key]

            time.sleep(1)
960480
def suspend(self):
        

        if self.manager.host_type != "ws":
            raise VMwareError("Pausing a VM is only supported by VMware Workstation")
        yield from self._control_vm("pause")
        self.status = "suspended"
        log.info("VMware VM '{name}' [{id}] paused".format(name=self.name, id=self.id))
1125890
def pause_writing(self):
        ''''''
        if not self.is_closing():
            self._can_send.clear()
            self.transport.pause_reading()
448700
def resume(self) -> None:
        """"""
        with self.__state_lock:
            if self.__state == DataChannelBuffer.State.paused:
                self.__state = DataChannelBuffer.State.started
57354
public void clearRecycle()
  {
    ArrayList<ClientSocket> recycleList = null;

    synchronized (this) {
      _idleHead = _idleTail = 0;

      for (int i = 0; i < _idle.length; i++) {
        ClientSocket stream;

        stream = _idle[i];
        _idle[i] = null;

        if (stream != null) {
          if (recycleList == null)
            recycleList = new ArrayList<ClientSocket>();

          recycleList.add(stream);
        }
      }
    }

    if (recycleList != null) {
      for (ClientSocket stream : recycleList) {
        stream.closeImpl();
      }
    }
  }
146780
def stop(self):
        
        log.info("%r: Stopping %r clients", self.container_id, len(self.clients))
        self.stopped = True
        self._close_clients()
983834
def pause(env, identifier):
    """"""

    vsi = SoftLayer.VSManager(env.client)
    vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS')

    if not (env.skip_confirmations or
            formatting.confirm('This will pause the VS with id %s. Continue?'
                               % vs_id)):
        raise exceptions.CLIAbort('Aborted.')

    env.client['Virtual_Guest'].pause(id=vs_id)
239571
def pause(self):
        """"""
        yield from self.manager.query("POST", "containers/{}/pause".format(self._cid))
        self.status = "suspended"
        log.info("Docker container '{name}' [{image}] paused".format(name=self._name, image=self._image))
767137
void reset(boolean closed) {
		attributeMap.clear();
		request.reset();
		handler.setBufferSize(MAX_BUFFER_SIZE);
		server.proxyTimeoutQueue.offer(this);
		// "proxy" may close or return "client" before reset
		if (logLevel >= LOG_VERBOSE && client != null) {
			Log.v((closed ? "Client Closed" : "Client Kept Alive") +
					" and Request Unblocked due to Complete Request and Response, " +
					client.toString(false));
		}
		if (!closed && client != null) {
			server.returnClient(client);
		}
		client = null;
		read();
	}
82052
function _cmdClose(clientId) {
    var client = _clients[clientId];
    if (client) {
        client.socket.close();
        delete _clients[clientId];
    }
}
436290
def stop(self):
        
        self.debug("()")
        super(SensorServer, self).stop()
        # No new clients
        if self._multicast_socket is not None:
            self._shutdown_multicast_socket()
        # Signal packet loop to shutdown
        self._is_stopped.set()
679829
def cleanup(self):
        
        if self.local_port is not None:
            logger.debug(("Stopping ssh tunnel {0}:{1}:{2} for "
                          "{3}@{4}".format(self.local_port,
                                           self.remote_address,
                                           self.remote_port,
                                           self.username,
                                           self.address)))
            if self.forward is not None:
                self.forward.stop()
                self.forward.join()
            if self.transport is not None:
                self.transport.close()
310014
def resume(self, mask, filename, port, pos):
        """"""
        self.connections['send']['masks'][mask][port].offset = pos
        message = 'DCC ACCEPT %s %d %d' % (filename, port, pos)
        self.bot.ctcp(mask, message)