Correction de l'envoi a soi meme durant la correction
This commit is contained in:
parent
5997873d6f
commit
b1c4edb05e
1 changed files with 15 additions and 6 deletions
|
@ -64,8 +64,11 @@ public class ChatApp {
|
|||
// Message que l'on envoie à tous les utilisateurs actifs
|
||||
String broadcastMessage = "Modification Pseudo\n" + this.getMe().getPseudo() + "\n" + nouveau + "\n";
|
||||
for(Integer p : ListPort ) {
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, port);
|
||||
if(p != this.getMe().getPort())
|
||||
{
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,8 +84,11 @@ public class ChatApp {
|
|||
// Message que l'on envoie à tous les utilisateurs actifs
|
||||
String broadcastMessage = "Connexion\n" + this.getMe().toString() ;
|
||||
for(Integer p : ListPort ) {
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||
if(p != this.getMe().getPort())
|
||||
{
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,8 +103,11 @@ public class ChatApp {
|
|||
// Message que l'on envoie à tous les utilisateurs actifs
|
||||
String broadcastMessage = "Deconnexion\n" + this.getMe().toString() ;
|
||||
for(Integer p : ListPort ) {
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, port);
|
||||
if(p != this.getMe().getPort())
|
||||
{
|
||||
Integer port = p ;
|
||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue