docs: def shutdown(self, reason = ConnectionClosed()):
          """Shutdown the socket server.
  
          The socket server will stop accepting incoming connections.
  
          All connections will be dropped.
  
          """
          if self._shutdown:
              raise ShutdownError()
          
          self.stop()
         
          self._closing = True
          for connection in self.connections:
              connection.close()
          self.connections = set()
          self._shutdown = True
          if isinstance(reason, ConnectionClosed):
              logger.info("server shutdown")
          else:
              logger.warn("server shutdown, reason %s" % str(reason))