title: What does boost::asio::ip::tcp::resolver::iterator do?
body: <p>I'm starting with boost asio programming in C++ and when looking over the examples I just can't understand what does <code>boost::asio::ip::tcp::resolver::iterator</code> do.</p>
  
  <p>Code:   </p>
  
  <pre><code>boost::asio::io_service io_service;
  
  tcp::resolver resolver(io_service);
  tcp::resolver::query query(argv[1]);
  tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
  tcp::resolver::iterator end;
  
  tcp::socket socket(io_service);
  boost::system::error_code error = boost::asio::error::host_not_found;
  while (error &amp;&amp; endpoint_iterator != end)
  {
    socket.close();
    socket.connect(*endpoint_iterator++, error);
  }
  </code></pre>
  
  <p>Please help me and excuse me if my question doesn't provide enough information. </p>