title: Asynchronous Client Socket Example from MSDN
body: <p>Ive a question about this example: <a href="http://msdn.microsoft.com/en-us/library/bew39x2a.aspx" rel="nofollow">Asynchronous Client Socket</a> .
  It says that the operations are asynchronous and they <strong>ARE</strong> (beginxxx/endxxx are presented), but they use <code>ManualResetEvent</code> and if i understand the sample code correctly - such calls:  </p>
  
  <pre><code>  Receive(client);
    receiveDone.WaitOne();
  </code></pre>
  
  <p>Will block the thread, they were called from. So that if i have an application with UI and i call that async socket code from main thread - application will freeze...Or am i wrong? Sorry, i expected to send/receive some commands over tcp asynchronously without freezing main thread. Will i have to call all the socket operations from that sample to avoid freezing? </p>