mirror of
https://github.com/guilhermewerner/java-chat
synced 2025-06-15 03:34:18 +00:00
Include client addr in message
This commit is contained in:
@ -58,9 +58,9 @@ class ClientHandler implements Runnable {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
String message;
|
||||
String message = clientSocket.getRemoteSocketAddress().toString() + ": ";
|
||||
|
||||
while ((message = reader.readLine()) != null) {
|
||||
while ((message += reader.readLine()) != null) {
|
||||
server.broadcast(message, this);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
Reference in New Issue
Block a user