code: public void run() {
  
  		try {
  			while (true) {
  				//server thread blocks until a client connects
  				Socket socket = server.accept();
  
  				System.out.println(new LogEntry("client (" + socket.getInetAddress().getHostAddress() + ") attempts to connect..."));
  				Connection c = establishConnection(socket);
  				updateConnectedClients(c);
  			}
  		} catch (IOException ioe) {
  			System.out.println(new LogEntry("server forced to stop with message " + ioe.getClass().getName() + ' ' + ioe.getMessage()));
  		} catch (Throwable t) {
  			System.out.println(new LogEntry(Level.CRITICAL, "server forced to stop with message " + t.getClass().getName() + ' ' + t.getMessage(), t));
  		}
  	}
docs: Contains the loop that waits for and handles incoming connections.