Boost logo

Boost Users :

Subject: [Boost-users] asio tutorial question on
From: Gavin Rogers (gavinr_at_[hidden])
Date: 2009-10-08 10:19:51


I am going through the tutorial on asio at
http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/tutorial/tutdaytime1.html

and so far so good. I have a question, the end iterator doesn't seem to
be assigned a value, in the examples. I was wondering how does it work..

e.g.

    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 && endpoint_iterator != end) // <<< Question:here
    {
      socket.close();
      socket.connect(*endpoint_iterator++, error);
    }

thanks.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net