title: How game servers with Boost:Asio work asynchronously?
body: <p>I am trying to create a game server, and currently, I am making it with threads. Every object( a player , monster ), has its own thread with while(1) cycle , in witch particular functions are performed.</p>
  
  <p>And the server basically works like this:</p>
  
  <pre><code>main(){
  
  //some initialization
  
  while(1)
  {
  //reads clients packet
  //directs packet info to a particular object
  //object performs some functions
  //then server returns result packet back to client
  Sleep(1);
  }
  </code></pre>
  
  <p>I have heard that is not efficient to make the server using threads like that,
  and I should consider to use Boost::Asio, and make the functions work asynchronously.
  But I don't know how then the server would work. I would be grateful if someone would explain how basically such servers work.</p>