TD2: Simplify the object serialization trough socket.
[TD_SR.git] / TD2 / client / SocketClient.java
index 92c7412113f3b2107c0edef45823691430405cd6..15ed27935892cd325019bb81689a6ce69037323a 100644 (file)
@@ -23,6 +23,20 @@ public class SocketClient {
         }
     }
 
+    public SocketClient(boolean withoStream) {
+        // établie une connexion au serveur par un appel
+        // à connexionServeur()
+        attributesInit();
+        try {
+            connexionServeur("localhost", 5000, withoStream);
+        }
+        catch (IOException e) {
+            System.err.println("IOException: " + e);
+            e.printStackTrace();
+            closeRWIO();
+        }
+    }
+
     public SocketClient(String adresseIPServeur, int portServeur) {
         // établie une connexion au serveur par un appel
         // à connexionServeur()