c++ - TCP listening on 0.0.0.0 Vs. listening on 127.0.0.1 -
from client side, i'm trying connect on 127.0.0.1:843. when server listening 0.0.0.0:843, client gets connection, but, when server listening on 127.0.0.1:843, connection refused. client , server on same machine, and, see 127.0.0.1:843 listening.
the code reference:
acceptor_(io_service, tcp::endpoint(boost::asio::ip::address_v4::from_string("127.0.0.1"), policy_port)); vs.
acceptor_(io_service, tcp::endpoint(tcp::v4(), policy_port)); what missing? thanks!
c++ tcp windows-7 localhost
No comments:
Post a Comment