correction erreurs broadcast
This commit is contained in:
parent
b1c4edb05e
commit
e11f4cf212
3 changed files with 3 additions and 6 deletions
Binary file not shown.
|
@ -64,9 +64,8 @@ public class ChatApp {
|
||||||
// Message que l'on envoie à tous les utilisateurs actifs
|
// Message que l'on envoie à tous les utilisateurs actifs
|
||||||
String broadcastMessage = "Modification Pseudo\n" + this.getMe().getPseudo() + "\n" + nouveau + "\n";
|
String broadcastMessage = "Modification Pseudo\n" + this.getMe().getPseudo() + "\n" + nouveau + "\n";
|
||||||
for(Integer p : ListPort ) {
|
for(Integer p : ListPort ) {
|
||||||
if(p != this.getMe().getPort())
|
if(!(p.equals(this.getMe().getPort())))
|
||||||
{
|
{
|
||||||
Integer port = p ;
|
|
||||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,9 +83,8 @@ public class ChatApp {
|
||||||
// Message que l'on envoie à tous les utilisateurs actifs
|
// Message que l'on envoie à tous les utilisateurs actifs
|
||||||
String broadcastMessage = "Connexion\n" + this.getMe().toString() ;
|
String broadcastMessage = "Connexion\n" + this.getMe().toString() ;
|
||||||
for(Integer p : ListPort ) {
|
for(Integer p : ListPort ) {
|
||||||
if(p != this.getMe().getPort())
|
if(!(p.equals(this.getMe().getPort())))
|
||||||
{
|
{
|
||||||
Integer port = p ;
|
|
||||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,9 +101,8 @@ public class ChatApp {
|
||||||
// Message que l'on envoie à tous les utilisateurs actifs
|
// Message que l'on envoie à tous les utilisateurs actifs
|
||||||
String broadcastMessage = "Deconnexion\n" + this.getMe().toString() ;
|
String broadcastMessage = "Deconnexion\n" + this.getMe().toString() ;
|
||||||
for(Integer p : ListPort ) {
|
for(Integer p : ListPort ) {
|
||||||
if(p != this.getMe().getPort())
|
if( !(p.equals(this.getMe().getPort())))
|
||||||
{
|
{
|
||||||
Integer port = p ;
|
|
||||||
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
UDPEchange.connexion(broadcastAdress,broadcastMessage, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue