title: testing socket communication offline as a simulation
body: <p>Whenever having to test my app which basically is some kind of communication via sockets with external devices, the device itself has to be available and connected.</p>
  
  <p>I would like to ask,if there is a way to do the testing offline in some kind of simulation mode?</p>
  
  <p>For instance, redirecting the socket communication to some kind of stored file. And the file itself is a log of a previous session with the real device stored in an appropriate structure. Of course one could only simulate a recorded session, but that would help a lot already.</p>
  
  <p>thanks!</p>