|
@ -27,8 +27,14 @@ public class ClientHandler implements Runnable { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
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(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|