Example #1
0
	client(boost::asio::io_service& io_service, const std::string& server) : resolver_(io_service) {
		conn = TCPConnection::create(io_service);

		tcp::resolver::query query(server, "daytime");
		resolver_.async_resolve(query,
			boost::bind(&client::handle_resolve, this, 
			boost::asio::placeholders::error,
			boost::asio::placeholders::iterator));

	}
int main()
{
    tcp::resolver::query q{"theboostcpplibraries.com", "80"};
    resolv.async_resolve(q, resolve_handler);
    ioservice.run();
}