title: Listening UDP or switch to TCP in a MFC application
body: <p>I'm editing a legacy MFC application, and I have to add some basic network functionalities. The operating side has to receive a simple instruction (numbers 1,2,3,4...) and do something based on that. The clients wants the latency to be as fast as possible, so naturally I decided to use datagrams (UDP). </p>
  
  <p>But reading all sorts of resources left me bugged. I cannot listen to UDP sockets (<code>CAsyncSocket</code>) in MFC, it's only possible to call Receive which blocks and waits. Blocking the UI isn't really a smart. So I guess I could use some threading technique, but since I'm not all that experienced with MFC how should that be implemented?</p>
  
  <p>The other part of the question is should I do this, or revert to TCP, considering reliability and implementation issues. I know that UDP is unreliable, but just how unreliable is it really? I read that it is up to 50% faster, which is a lot for me.</p>
  
  <p>References I used:
  <a href="http://msdn.microsoft.com/en-us/library/09dd1ycd(v=vs.80).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/09dd1ycd(v=vs.80).aspx</a></p>