WIP6 système de connection à plusieurs utilisateurs
This commit is contained in:
parent
fbcef32a35
commit
fdc002ff80
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ package chat;
|
|||
|
||||
import java.net.*;
|
||||
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.*;
|
||||
|
@ -12,6 +13,7 @@ import java.util.*;
|
|||
|
||||
import chat.User;
|
||||
|
||||
|
||||
class SendThread extends Thread {
|
||||
String username;
|
||||
String address;
|
||||
|
@ -250,7 +252,7 @@ public class ClientWindow implements ActionListener {
|
|||
}
|
||||
catch(SocketTimeoutException e)
|
||||
{
|
||||
user.add_to_known_users(username, InetAddress.getLocalHost().getHostAddress());
|
||||
user.add_to_known_users(username, connectionSocket.getLocalAddress().getHostAddress());
|
||||
System.out.println("Reply timed out");
|
||||
connected = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue