docs: public void close () {
  		Connection[] connections = this.connections;
  		if (INFO && connections.length > 0) info("kryonet", "Closing server connections...");
  		for (int i = 0, n = connections.length; i < n; i++)
  			connections[i].close();
  		connections = new Connection[0];
  
  		ServerSocketChannel serverChannel = this.serverChannel;
  		if (serverChannel != null) {
  			try {
  				serverChannel.close();
  				if (INFO) info("kryonet", "Server closed.");
  			} catch (IOException ex) {
  				if (DEBUG) debug("kryonet", "Unable to close server.", ex);
  			}
  			this.serverChannel = null;
  		}
  
  		UdpConnection udp = this.udp;
  		if (udp != null) {
  			udp.close();
  			this.udp = null;
  		}
  
  		synchronized (updateLock) { // Blocks to avoid a select while the selector is used to bind the server connection.
  		}
  		// Select one last time to complete closing the socket.
  		selector.wakeup();
  		try {
  			selector.selectNow();
  		} catch (IOException ignored) {
  		}
  	}