I am making a program for school in which two programs communicate with each other. So far I have not been able to connect the two programs. Whenever I try to connect to loc
You should use:
tcp::resolver::query query(host, PORT, boost::asio::ip::resolver_query_base::numeric_service);
The problem was that the constructor for query has the address_configured flag set by default which won't return an address if the loopback device is the only device with an address. By just settings flags to 0 or anything other than address_configured the problem is fixed.
How does Boost Asio's hostname resolution work on Linux? Is it possible to use NSS?
I will more help you if you paste the whole code. For the very beginning there is really useful piece of code here:
http://boost.2283326.n4.nabble.com/Simple-telnet-client-demonstration-with-boost-asio-asynchronous-I-O-td2583017.html
it works and you can test it with your local telnet.