I have code that looks like the following:
//unrelated code snipped
resolver.reset(new tcp::resolver(iosvc));
tcp::resolver::query query(host, port);
resolver->async_resolve(query,
boost::bind(&TCPTransport::handle_resolve, this,
boost::asio::placeholders::error,
boost::asio::placeholders::iterator));
LOG4CXX_INFO(logger, "Attempting connection to at " << host << ":" << port);
//unrelated code snipped
void TCPTransport::handle_resolve(const boost::system::error_code& err,
tcp::resolver::iterator endpoint_iterator)
{
if (err)
{
LOG4CXX_ERROR(logger, "Error: " << err.message());
}
else
{
tcp::endpoint endpoint = *endpoint_iterator;
if (!socket)
{
socket.reset(new tcp::socket(iosvc));
}
socket->async_connect(endpoint,
boost::bind(&TCPTransport::handle_connect, this,
boost::asio::placeholders::error, ++endpoint_iterator));
}
}
When I run this code, with the appropriate gate and port of the server I know is up an running, I get the following text in my log file: Error: Service not found
Can anyone provide some insight into what this error actually means?