Tento commit je obsažen v:
Alexandre Gonzalvez 2020-12-18 11:55:06 +01:00
rodič 90d485801d
revize 7f503531d1
3 změnil soubory, kde provedl 8 přidání a 3 odebrání

Zobrazit soubor

@ -479,6 +479,10 @@ public class Controller {
/** Création de l'interface graphique **/
ctr1.interfaceRunning =true;
ctr1.view=Interface.createAndShowGUI(ctr1);
ctr2.interfaceRunning =true;
ctr2.view=Interface.createAndShowGUI(ctr2);
ctr3.interfaceRunning =true;
ctr3.view=Interface.createAndShowGUI(ctr3);
/** loop **/
while(ctr1.interfaceRunning) {

Zobrazit soubor

@ -91,7 +91,7 @@ public class ListeningThreadTCPChat extends ListeningThread{
c = controller.myUser.getChats().get(indexChat);
}
else {
this.controller.openSession(rm);
c=this.controller.openSession(rm);
}
}
else {

Zobrazit soubor

@ -9,7 +9,7 @@ import java.net.Socket;
public class ListeningThreadTCPConnection extends ListeningThread{
private Socket socket_tcp=null;
private int nbChat = 0;
/* CONSTRUCTOR OF ListeningThreadTCPConnection
* @parametres
* @param s : String => nom du thread
@ -25,7 +25,8 @@ public class ListeningThreadTCPConnection extends ListeningThread{
public void accept(ServerSocket servSocket) throws IOException {
Socket socket_tcp= servSocket.accept();
ListeningThreadTCPChat threadtcpchat = new ListeningThreadTCPChat("Chat_with_"+controller.myUser.getPseudo(),controller,socket_tcp);
this.nbChat++;
ListeningThreadTCPChat threadtcpchat = new ListeningThreadTCPChat("Chat_of_"+controller.myUser.getPseudo()+"_"+nbChat,controller,socket_tcp);
threadtcpchat.start();
threadtcpchat.interrupt();