TD2: code cleanup in the client part.
[TD_SR.git] / TD2 / ThreadClientSend.java
diff --git a/TD2/ThreadClientSend.java b/TD2/ThreadClientSend.java
deleted file mode 100644 (file)
index 2ad2bcb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-import java.util.concurrent.ThreadLocalRandom;
-
-public class ThreadClientSend implements Runnable {
-    private SocketClient client;
-    private String msg = new String();
-
-    ThreadClientSend(SocketClient c) {
-        client = c;
-    }
-
-    /**
-     * [setMsg description]
-     * @param m [description]
-     */
-    public void setMsg(String m) {
-        msg = m;
-    }
-
-    public void run() {
-        while (true) {
-            try {
-                client.sendMsg(msg);
-                System.out.println (Thread.currentThread().getName() + " a envoye " + msg);
-                try {
-                               Thread.sleep(ThreadLocalRandom.current().nextInt(101));
-                       }
-                       catch (InterruptedException e) {
-                               System.err.println("InterruptedException: " + e);
-                       }
-            }
-            catch (Exception e) {
-                System.err.println("Exception: " + e);
-            }
-            //finally {
-            //    client.closeRWIO();
-            //}
-        }
-    }
-}