简体   繁体   中英

boost asio fail to bind port 80

My application is written in c++ thanks to boost asio library, with classical methods:

acceptor_.open(endpoint.protocol());
acceptor_.set_option(boost::asio::ip::tcp::no_delay(true));
acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
acceptor_.bind(endpoint);
acceptor_.listen();

On same machine, iis is running for a classic website.

I can't bind endpoint on port 80 in same time website is running. When i put a other port for binding, all is ok. It would be Is there an issue for usin website and asio binding on same port?

Thanks for help me ...

IIS binds to port 80 by default. so that you cannot bind. If you want to bnd to port 80, stop IIS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM