|
Boost Users : |
Subject: [Boost-users] Boost asio reuse address
From: Sharma, Nishant (Nishant_Sharma_at_[hidden])
Date: 2018-01-03 06:37:22
Hi,
Just wanted to know if setting the following option on acceptor should be ever done or not.. When should this be used..
acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
The reason I am asking this is because I have a server application which crashed but the socket did not close. So, the next time, I was bringing up the server, I get the error :
Error occured! Error code = system:98. Message: bind: Address already in use
But, even giving the option above, it is not working fine.
I referred to the URL : https://stackoverflow.com/questions/34596638/boost-asio-so-reuseport to figure out the steps in which acceptor should be created from this link.
Best Regards,
Nishant Sharma
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net