--- /dev/null
+import java.io.*;
+
+public class ThreadClientoReceive implements Runnable {
+ private SocketClient client;
+
+ ThreadClientoReceive(SocketClient c) {
+ client = c;
+ }
+
+ public void run() {
+ try {
+ boolean end = false;
+ //FIXME: not exiting properly randomly from that loop!
+ while (!end) {
+ Message roMsg = client.receiveoMsg();
+ if (roMsg.getTexte().equals(".")) {
+ end = true;
+ }
+ System.out.println(Thread.currentThread().getName() + " a recu " + roMsg);
+ }
+ }
+ catch (IOException e) {
+ System.err.println("IOException: " + e);
+ e.printStackTrace();
+ }
+ catch (ClassNotFoundException e) {
+ System.err.println("ClassNotFoundException: " + e);
+ e.printStackTrace();
+ }
+ }
+}