diff --git a/src/main/java/ClientHandler.java b/src/main/java/ClientHandler.java index 200dccf..6711e84 100644 --- a/src/main/java/ClientHandler.java +++ b/src/main/java/ClientHandler.java @@ -27,8 +27,14 @@ public class ClientHandler implements Runnable { @Override public void run() { - // TODO Auto-generated method stub - + try { + fromClientReader = new BufferedReader(new InputStreamReader(connectionToClient.getInputStream())); + toClientWriter = new PrintWriter(new OutputStreamWriter(connectionToClient.getOutputStream())); + chatServer.broadcastMessage(name + " connected."); + + } catch (IOException e) { + e.printStackTrace(); + } }