I have this loop running in a thread:
ServerSocket ss = new ServerSocket(PORT); while (running) { ClientHandler ch = new ClientHandler(ss.accept); }