title: boost::asio async_read doesn't receive data or doesn't use callback
body: <p>I am trying to receive data from a server application using boost asio's <code>async_read()</code> free function, but the callback I set for when the receiving is never called.</p>
  
  <p>The client code is like this:</p>
  
  <pre><code>Client::Client()
  {
    m_oIoService.run(); // member boost::asio::io_service
    m_pSocket = new boost::asio::ip::tcp::socket(m_oIoService);
  
    // Connection to the server
    [...]
  
    // First read
    boost::asio::async_read(*m_pSocket,
                            boost::asio::buffer((void*)&amp;m_oData, sizeof(m_oData)),
                            boost::bind(&amp;Client::handleReceivedData, this,
                                        boost::asio::placeholders::error,
                                        boost::asio::placeholders::bytes_transferred));
  }
  </code></pre>
  
  <p>I tried with small data (a short string) and I can't get it to work. When I use the synchronous read function (<code>boost::asio::read()</code>) using the two same first parameters, everything works perfectly.</p>
  
  <p>Am I missing something with the use of the io_service? I am still unsure about how it works.</p>