@@ -0,0 +1,718 @@
+package default_package;%0Aimport java.io.IOException;%0Aimport java.util.Scanner;%0A%0Apublic class ChatConsole %7B%0A%09public static void main(String%5B%5D args) throws IOException %7B%0A%09%09Scanner sc = new Scanner(System.in);%0A%09%09boolean isServer = (args%5B0%5D.equals(%22true%22)? true : false);%0A%09%09Chat chat = new Chat( isServer , 1723);%0A%09%09%0A%09%09if(isServer)%7B//permet de d%C3%A9terminer un logiciel prioritaire%0A%09%09%09String msg = chat.waitForMessage();%0A%09%09%09System.out.println(msg);%0A%09%09%7D%0A%09%09while(true)%7B%0A%09%09%09System.out.print(%22%3E%22);%0A%09%09%09String msg = sc.nextLine();%0A%09%09%09if(msg.equals(%22STOP%22))%7B%0A%09%09%09%09chat.sendMessage(%22END%22);%0A%09%09%09%09sc.close();%0A%09%09%09%09System.exit(0);%0A%09%09%09%7D%0A%09%09%09chat.sendMessage(msg);%0A%09%09%09msg = chat.waitForMessage();%0A%09%09%09System.out.println(msg);%0A%09%09%09%0A%09%09%7D%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create ChatConsole.java