title: Boost Asio async_read doesn't stop reading?
body: <p>So,</p>
  
  <p>I've been playing around with the Boost asio functions and sockets (specifically the async read/write).  Now, I thought that <code>boost::asio::async_read</code> only called the handler when a new buffer came in from the network connection... however it doesn't stop reading the same buffer and thus keeps calling the handler.  I've been able to mitigate it by checking the number of bytes transferred, however it is basically in a busy-waiting loop wasting CPU cycles.  </p>
  
  <p>Here is what I have:</p>
  
  <pre><code>class tcp_connection : : public boost::enable_shared_from_this&lt;tcp_connection&gt; 
  {
  public:
      // other functions here
  
      void start()
      {
      boost::asio::async_read(socket_, boost::asio::buffer(buf, TERRAINPACKETSIZE),
          boost::bind(&amp;tcp_connection::handle_read, shared_from_this(),
            boost::asio::placeholders::error,
            boost::asio::placeholders::bytes_transferred));
      }
  
  private:
      const unsigned int TERRAINPACKETSIZE = 128;
      char buf[TERRAINPACKETSIZE];
  
  
      void handle_read(const boost::system::error_code&amp; error, size_t bytesT)
      {
          if (bytesT &gt; 0)
          { 
               // Do the packet handling stuff here
          }
  
          boost::asio::async_read(socket_, boost::asio::buffer(buf, TERRAINPACKETSIZE),
          boost::bind(&amp;tcp_connection::handle_read, shared_from_this(),
            boost::asio::placeholders::error,
            boost::asio::placeholders::bytes_transferred));
      }
  };
  </code></pre>
  
  <p>Some stuff is cut out, but basically a new connection gets created then <code>start()</code> is called.  Is there something I'm missing so that the <code>handle_read</code> method doesn't get continuously called?</p>