code: @Override
      public void disconnect()
      {
          if (!started)
          {
              return;
          }
          receiveMessages();
          clientConnectionListener.terminate();
  
          // Disconnect all clients
          final Collection<ClientSocket> delete = new ArrayList<>(clients.size());
          for (final ClientSocket client : clients.values())
          {
              for (final ClientSocket other : clients.values())
              {
                  if (other.getId() == client.getId())
                  {
                      continue;
                  }
                  try
                  {
                      other.getOut().writeByte(NetworkMessageSystemId.OTHER_CLIENT_DISCONNECTED);
                      ServerImpl.writeIdAndName(other, client.getId(), client.getName());
                      other.getOut().flush();
                  }
                  catch (final IOException exception)
                  {
                      Verbose.exception(exception);
                  }
              }
              delete.add(client);
          }
          for (final ClientSocket client : delete)
          {
              client.sendMessage(NetworkMessageSystemId.KICKED);
              removeClient(client);
          }
          delete.clear();
          clients.clear();
          try
          {
              serverSocket.close();
          }
          catch (final IOException exception)
          {
              Verbose.exception(exception, "Error on closing server");
          }
          started = false;
      }
docs: /*
  Networker