Compare commits
1 commit
7e455e7606
...
170da9977d
Author | SHA1 | Date | |
---|---|---|---|
170da9977d |
4 changed files with 4 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
/bin/
|
/bin/
|
||||||
|
*.jar
|
||||||
*.class
|
*.class
|
||||||
|
|
BIN
Projet.jar
BIN
Projet.jar
Binary file not shown.
|
@ -72,9 +72,9 @@ class ReceiveThread extends Thread {
|
||||||
boolean exit = false;
|
boolean exit = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ObjectInputStream in = new ObjectInputStream(socket.getInputStream());
|
|
||||||
while(!exit)
|
while(!exit)
|
||||||
{
|
{
|
||||||
|
ObjectInputStream in = new ObjectInputStream(socket.getInputStream());
|
||||||
Message message = (Message) in.readObject();
|
Message message = (Message) in.readObject();
|
||||||
if(message.getText() != null)
|
if(message.getText() != null)
|
||||||
{
|
{
|
||||||
|
@ -365,9 +365,8 @@ public class NetworkClient {
|
||||||
(new ListenerStartThread(s1, dest_sockets)).start();
|
(new ListenerStartThread(s1, dest_sockets)).start();
|
||||||
|
|
||||||
Socket s2 = new Socket(getLocalIP(), portNumber);
|
Socket s2 = new Socket(getLocalIP(), portNumber);
|
||||||
/*Attention, getLocalIP ne marche que sur un même réseau physique
|
/*Attention! getLocalIP ne marche que si les machines sont sur un même réseau local physique
|
||||||
* pour tester avec Hamachi, il faut hardcoder les IP
|
Pour tester avec Hamachi, il faut hardcoder les IP*/
|
||||||
*/
|
|
||||||
(new ReceiveThread(user, s2, chatText, known_users, knownUsersPanel, dest_sockets)).start();
|
(new ReceiveThread(user, s2, chatText, known_users, knownUsersPanel, dest_sockets)).start();
|
||||||
}
|
}
|
||||||
catch(IOException e)
|
catch(IOException e)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
package chat;
|
|
Loading…
Reference in a new issue