Index: trunk/lib/FlairSensorActuator/src/HostEthController.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/HostEthController.cpp	(revision 232)
+++ trunk/lib/FlairSensorActuator/src/HostEthController.cpp	(revision 238)
@@ -142,5 +142,5 @@
 }
 
-bool HostEthController::ConnectedWithTarget() {
+bool HostEthController::ConnectWithTarget() {
   char message[1024];
   ssize_t sent, received;
@@ -181,5 +181,5 @@
       GetButtonData();
 
-      if (ConnectedWithTarget()) {
+      if (ConnectWithTarget()) {
         // read for commands from the target (remote control state change
         // requests such as rumble or led on/off)
@@ -201,5 +201,5 @@
       }
     } else { // try to connect even if host is not sending anything
-      ConnectedWithTarget();
+      ConnectWithTarget();
     }
     // Thread::Info("Debug: exiting acquisition loop\n");
@@ -291,5 +291,5 @@
     WaitPeriod();
     if (hostEthController->meaningfulDataAvailable &&
-        hostEthController->ConnectedWithTarget()) {
+        hostEthController->ConnectWithTarget()) {
       // send the data
       hostEthController->BuildDataFrame();
Index: trunk/lib/FlairSensorActuator/src/HostEthController.h
===================================================================
--- trunk/lib/FlairSensorActuator/src/HostEthController.h	(revision 232)
+++ trunk/lib/FlairSensorActuator/src/HostEthController.h	(revision 238)
@@ -25,15 +25,15 @@
 
 namespace flair {
-namespace core {
-class Matrix;
-class TcpSocket;
-class UdpSocket;
-class Mutex;
-}
-namespace gui {
-class Tab;
-class TabWidget;
-class DataPlot1D;
-}
+  namespace core {
+    class Matrix;
+    class TcpSocket;
+    class UdpSocket;
+    class Mutex;
+  }
+  namespace gui {
+    class Tab;
+    class TabWidget;
+    class DataPlot1D;
+  }
 }
 
@@ -47,9 +47,9 @@
 *through ethernet connection
 *
-* There are 2 communication channels:
+* There are 3 communication channels:
 *   - 1 connection with the ground station to display the values. Output for
-*analog sticks is normalized in the range [-1, 1] (float values)
-*   - 1 connection with the target to send the controller values (and receive
-*controller state modification requests)
+*analog sticks is normalized in the range [-1, 1] (float values) (through DrawUserInterface, use a UDT socket)
+*   - 1 connection with the target to send the controller values (through udp socket - high bandwitdh, packets may be discarded)
+*   - 1 connection with the target to receive controller state modification requests (through tcp socket - low bandwidth, packets must not be discarded)
 */
 class HostEthController : public core::Thread, public core::IODevice {
@@ -107,5 +107,5 @@
 
   bool ControllerInitialization();
-  bool ConnectedWithTarget();
+  bool ConnectWithTarget();
   void SendControllerInfo();
   void Run();
Index: trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/SimuCamera.cpp	(revision 232)
+++ trunk/lib/FlairSensorActuator/src/SimuCamera.cpp	(revision 238)
@@ -80,13 +80,17 @@
     output->GetMutex();
     //blocking read
-    shmem->Read(shmemReadBuf, buf_size); // remplacer copie par
-                                                   // échange de pointeur sur
-                                                   // double buffering
-                                            
-    output->ReleaseMutex();
-    memcpy(&time,shmemReadBuf+buf_size-sizeof(Time),sizeof(Time));
-    output->SetDataTime(time);
+    if (shmem->Read(shmemReadBuf, buf_size, 1000000000)) { // remplacer copie par
+      // échange de pointeur sur
+      // double buffering
 
-    ProcessUpdate(output);
+      output->ReleaseMutex();
+      memcpy(&time, shmemReadBuf + buf_size - sizeof(Time), sizeof(Time));
+      output->SetDataTime(time);
+
+      ProcessUpdate(output);
+    } else {
+      output->ReleaseMutex();
+      Thread::Warn("Read Timeout\n");
+    }
   }
 }
Index: trunk/lib/FlairSensorActuator/src/TargetEthController.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/TargetEthController.cpp	(revision 232)
+++ trunk/lib/FlairSensorActuator/src/TargetEthController.cpp	(revision 238)
@@ -59,4 +59,5 @@
     // socket to be closed by the client
     controlSocket->RecvMessage(msg.buffer, msg.bufferSize);
+    delete controlSocket;
   }
 
@@ -65,4 +66,6 @@
   SafeStop();
   Join();
+  delete dataSocket;
+  delete listeningSocket;
 }
 
@@ -202,5 +205,5 @@
 
 bool TargetEthController::ProcessMessage(Message *msg) {
-  return !(controlSocket->SendMessage(msg->buffer, msg->bufferSize, 0) < 0);
+  return !(controlSocket->SendMessage(msg->buffer, msg->bufferSize, TIME_INFINITE) < 0);
 }
 
@@ -234,9 +237,16 @@
   bool connectionAccepted = false;
   while (!connectionAccepted) {
-    controlSocket = listeningSocket->Accept(10);
-    if (controlSocket == nullptr) {
-      // Timeout (or error btw)
+    try {
+      controlSocket = listeningSocket->Accept(100000000);
+    } catch (std::logic_error &e) {
+      Thread::Err(e.what());
+      return false;
+    } catch (std::runtime_error e) {
+      // timeout
       if (ToBeStopped())
         return false;
+    }
+    if (controlSocket == nullptr) {
+      return false;
     } else
       connectionAccepted = true;
@@ -248,5 +258,5 @@
   while (!axisNumberRead) {
     try {
-      axisNumber = controlSocket->ReadUInt32(10);
+      axisNumber = controlSocket->ReadUInt32(100000000);
       // Thread::Info("Debug: axisNumber %d\n", axisNumber);
       axisNumberRead = true;
@@ -260,5 +270,5 @@
   while (!bitsPerAxisRead) {
     try {
-      bitsPerAxis = controlSocket->ReadUInt32(10);
+      bitsPerAxis = controlSocket->ReadUInt32(100000000);
       // Thread::Info("Debug: bits per axis %d\n", bitsPerAxis);
       bitsPerAxisRead = true;
@@ -276,5 +286,5 @@
     while (!stringSizeRead) {
       try {
-        stringSize = controlSocket->ReadUInt32(10);
+        stringSize = controlSocket->ReadUInt32(100000000);
         stringSizeRead = true;
       } catch (std::runtime_error e) {
@@ -288,5 +298,5 @@
     while (!axisNameRead) {
       try {
-        axisName[i] = controlSocket->ReadString(stringSize, 10);
+        axisName[i] = controlSocket->ReadString(stringSize, 100000000);
         axisNameRead = true;
       } catch (std::runtime_error e) {
@@ -303,5 +313,5 @@
   while (!buttonNumberRead) {
     try {
-      buttonNumber = controlSocket->ReadUInt32(10);
+      buttonNumber = controlSocket->ReadUInt32(100000000);
       buttonNumberRead = true;
     } catch (std::runtime_error e) {
@@ -319,5 +329,5 @@
     while (!stringSizeRead) {
       try {
-        stringSize = controlSocket->ReadUInt32(10);
+        stringSize = controlSocket->ReadUInt32(100000000);
         stringSizeRead = true;
       } catch (std::runtime_error e) {
@@ -331,5 +341,5 @@
     while (!buttonNameRead) {
       try {
-        buttonName[i] = controlSocket->ReadString(stringSize, 10);
+        buttonName[i] = controlSocket->ReadString(stringSize, 10000000);
         buttonNameRead = true;
       } catch (std::runtime_error e) {
