WIP6 système de connection à plusieurs utilisateurs
This commit is contained in:
父節點
fbcef32a35
當前提交
fdc002ff80
共有 1 個文件被更改,包括 3 次插入 和 1 次删除
|
@ -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;
|
||||
}
|
||||
|
|
載入中…
Reference in a new issue