@@ -0,0 +1,1389 @@
+package reseau_tp_1;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.BufferedWriter;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.io.OutputStreamWriter;%0Aimport java.net.Socket;%0Aimport java.util.GregorianCalendar;%0Aimport java.util.HashSet;%0A%0Apublic class ThreadServerChat extends Thread%7B%0A%09private BufferedWriter out;%0A%09private BufferedReader in;%0A%09private String ligne;%0A%09private Socket client;%0A%09private HashSet%3CString%3E roomsChat = new HashSet%3CString%3E();%0A%09public ThreadServerChat(Socket client)%7B%0A%09%09this.client = client;%0A%09%7D%0A%09public void run()%7B%0A%09%09try %7B%0A%09%09%09this.out = new BufferedWriter(new OutputStreamWriter(this.client.getOutputStream()));%0A%09%09%09String date = new GregorianCalendar().getTime().toString();%0A%09%09%09this.out.write(date);%0A%09%09%09this.out.newLine();%0A%09%09%09this.out.flush();%0A%09%09%09%0A%09%09%09this.out.write(%22Choisir une room de chat%22);%0A%09%09%09this.out.newLine();%0A%09%09%09this.out.flush();%0A%09%09%09%0A%09%09%09String rooms = %22%22;%0A%09%09%09for (String s : roomsChat) %7B%0A%09%09%09    rooms += s + %22%5Cn%22;%0A%09%09%09%7D%0A%09%09%09this.out.write(rooms);%0A%09%09%09this.out.newLine();%0A%09%09%09this.out.flush();%0A%09%09%09%0A%09%09%09this.in = new BufferedReader(new InputStreamReader(this.client.getInputStream()));%09%09%0A%09%09%09while((this.ligne = this.in.readLine())!=null)%7B%0A%09%09%09%09this.out.write(ligne.toUpperCase());%0A%09%09%09%09this.out.newLine();%0A%09%09%09%09this.out.flush();%0A%09%09%09%7D%0A%09%09%09this.in.close();%0A%09%09%09this.client.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create ThreadServerChat.java