Stop serving the :attr:`.Server.sockets`.
962608
async def close(self):
        
        if self._server:
            self._server.close()
            self._server = None
            coro = self._close_connections()
            if coro:
                await coro
            self.logger.debug('%s closed', self)
            self.event('stop').fire()
111698
def stop(self):
        """"""
        self.working = False
        for w in self.workers:
            w.join()
        self.workers = []
318525
@Override
	public void stop()
	{
		if (!started)
			return;
		
		log.info("Stopping listener ["+getName()+"]");
		
		// Close the listen socket
		multiplexer.unregisterServerSocketHandler(this);
		multiplexer.stop();
		multiplexer = null;
		
		// Close remaining clients
		closeRemainingClients();
		
		started = false;
	}
117300
def stop(self) -> None:
        """"""
        self._running = False
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
            self._timeout = None
1330659
public synchronized void stop() {
        if (listenerThreads.size() > 0) {
            for (MulticastSocketListenerThread thread : listenerThreads) {
                thread.shutdown();
            }
        }

        listenerThreads.clear();
    }
522072
public function stop()
    {
        $this->stopWorkerPools();
        $this->workerJobSocket->disconnect($this->config['sockets']['worker_job']);
        $this->workerReplySocket->close();
        $this->clientSocket->close();
        $this->loop->stop();
    }
266000
def stop(self):
        
        self.my_server.stop()
        self.http_thread.join()
        logging.info("HTTP server: Stopped")
27423
def stop(self):
        
        action = {'action': 'stop'}
        j, r = self.datacenter.request('POST', self.path, params=action)
        r.raise_for_status()
720242
public void stop() {
    if (acceptChannel == null || !acceptChannel.isOpen()) {
      LOG.info("Fail to stop server; not yet open.");
      return;
    }
    // Clear all connected socket and related stuff
    for (Map.Entry<SocketChannel, SocketChannelHelper> connections : activeConnections.entrySet()) {
      SocketChannel channel = connections.getKey();
      SocketAddress channelAddress = channel.socket().getRemoteSocketAddress();
      LOG.info("Closing connected channel from client: " + channelAddress);
      LOG.info("Removing all interest on channel: " + channelAddress);
      nioLooper.removeAllInterest(channel);

      // Dispatch the child instance
      onClose(channel);
      // Clear the SocketChannelHelper
      connections.getValue().clear();
    }

    // Clear state inside the HeronServer
    activeConnections.clear();
    requestMap.clear();
    messageMap.clear();
    try {
      acceptChannel.close();
    } catch (IOException e) {
      LOG.log(Level.SEVERE, "Failed to close server", e);
    }
  }
657500
private static void stopAll()
    { 
        if (_configs!=null)
        {
            synchronized(_configs)
            {
                for(int i=0;i<_servers.size();i++)
                {
                    HttpServer server = (HttpServer)_servers.get(i);
                    try{server.stop();}catch(InterruptedException e){}
                }
            }
        }
    }
373879
public synchronized void stop() {
        if (isRunning()) {
            socket.get().close();
            socket.set(null);
            deliverLifecycleAnnouncement(logger, false);
        }
    }
1352422
def stop(self):
        """"""
        self.ready = False
        
        sock = getattr(self, "socket", None)
        if sock:
            if not isinstance(self.bind_addr, basestring):
                # Touch our own socket to make accept() return immediately.
                try:
                    host, port = sock.getsockname()[:2]
                except socket.error, x:
                    if x.args[0] not in socket_errors_to_ignore:
                        # Changed to use error code and not message
                        # See http://www.cherrypy.org/ticket/860.
                        raise
                else:
                    # Note that we're explicitly NOT using AI_PASSIVE,
                    # here, because we want an actual IP to touch.
                    # localhost won't work if we've bound to a public IP,
                    # but it will if we bound to '0.0.0.0' (INADDR_ANY).
                    for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                                                  socket.SOCK_STREAM):
                        af, socktype, proto, canonname, sa = res
                        s = None
                        try:
                            s = socket.socket(af, socktype, proto)
                            # See http://groups.google.com/group/cherrypy-users/
                            #        browse_frm/thread/bbfe5eb39c904fe0
                            s.settimeout(1.0)
                            s.connect((host, port))
                            s.close()
                        except socket.error:
                            if s:
                                s.close()
            if hasattr(sock, "close"):
                sock.close()
            self.socket = None
        
        self.requests.stop(self.shutdown_timeout)
949846
public void stop() {
    try {
      if (socket != null) {
        socket.close();
        socket = null;
        LOGGER.info("Disconnected from graphite server: {}", graphiteServerURI);
      }
    } catch (IOException e) {
      LOGGER.warn("Error Stopping", e);
    }
  }
375344
def teardown_socket(s):
  """"""
  try:
    s.shutdown(socket.SHUT_WR)
  except socket.error:
    pass
  finally:
    s.close()
1028521
def stop(self):
        """"""
        if self.closed:
            raise ConnectionClosed()

        if self.read_watcher.active:
            self.read_watcher.stop()
        if self.write_watcher.active:
            self.write_watcher.stop()
1045330
public synchronized void stop() {
    if (isStopped()) {
      throw new IllegalStateException("Failed to stop Socket.IO server: server already stopped");
    }

    log.info("Socket.IO server stopping");

    timer.stop();
    bootstrap.config().group().shutdownGracefully().syncUninterruptibly();
    state = State.STOPPED;

    log.info("Socket.IO server stopped");
  }
688697
def stop(self, *args, **kwargs):
        
        if args:
            LOG.debug("args: %s" % str(args))
        if kwargs:
            LOG.debug("kwargs: %s" % str(kwargs))
        try:
            self._server.stop()
            self._server = None

            # Device-storage clear
            self.devices.clear()
            self.devices_all.clear()
            self.devices_raw.clear()
            self.devices_raw_dict.clear()

            return True
        except Exception as err:
            LOG.critical("Failed to stop server")
            LOG.debug(str(err))
            return False