Boost Asio を使用して HTTP クライアントを作成しようとしています。asio から同期クライアントの例をコピーし、コンパイルしてから実行しました。残念ながら、私のログでは、Service not found と表示されます。コードをトレースしたところ、次のコードからスローされていることがわかりました。
boost::asio::io_service io_service;
// Get a list of endpoints corresponding to the server name.
tcp::resolver resolver(io_service);
//->if i removed the http, it has no error
tcp::resolver::query query("host.com", "http");
//->This part throws the service not found
tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
tcp::resolver::iterator end;
なぜサービスが見つからないのか、またはこれをどのように解決できるのかを誰かが説明できますか?