public void addThread(Socket socket) { System.out.println("Client accepted: " + socket); client = new ChatServerThread(this, socket); try { client.open(); client.start(); } catch (IOException ioe) { System.out.println("Error opening thread: " + ioe); } }