title: Boost::Asio Threaded Server Asynchroun Problem. Nothing happen
body: <p>I´m making a Server with the BoostLib, and so i am using the asio lib.</p>
  
  <p>I made an Server class.</p>
  
  <pre><code>Server::Server(unsigned short port)
   : m_IOService(),
     m_Socket(m_IOService),
     m_Endpoint(boost::asio::ip::tcp::v4(), port),
     m_Acceptor(m_IOService)
  {
   m_Port = port;
  
   m_Acceptor.open(m_Endpoint.protocol());
   m_Acceptor.bind(m_Endpoint);
  }
  </code></pre>
  
  <p>And the Start Function:</p>
  
  <pre><code>void Server::Run()
  {
   // Threading
   //////////////////////////////////////////////////////
     std::vector&lt;boost::shared_ptr&lt;boost::thread&gt; &gt; threads;
     for (std::size_t i = 0; i &lt; THREAD_POOL_SIZE; ++i)
     {
    boost::shared_ptr&lt;boost::thread&gt; thread(new boost::thread(
       boost::bind(&amp;boost::asio::io_service::run, &amp;m_IOService)));
    threads.push_back(thread);
     }
  
     // Wait for all threads in the pool to exit.
     for (std::size_t i = 0; i &lt; threads.size(); ++i)
    threads[i]-&gt;join();
  
  
  
   // Begin Client accepting
   //////////////////////////////////////////////////////
  
   m_Acceptor.listen();
   m_Acceptor.async_accept(
    m_FreeClient-&gt;GetSocket(),
    boost::bind(&amp;Server::OnConnection, this, boost::asio::placeholders::error));
  }
  </code></pre>
  
  <p>m_FreeClient is a Pointer to  the Client Class. </p>
  
  <pre><code>GetSocket Defination: `boost::asio::ip::tcp::socket&amp; GetSocket();´
  </code></pre>
  
  <p>I compiled &amp; started this Code, and connected with a little TestClient. Connection is there, but Server::OnConnection never will be called. I debugged, and set a breakpoint, but it never breaks there.</p>
  
  <p>So what is wrong. THREAD_POOL_SIZE is 25.</p>