I am required to set the options boost::asio::ip::tcp::no_delay
and boost::asio::socket_base::linger
for a boost::asio::ip::tcp::socket
that connects to a remote TCP server. I used the method set_option
in order to achieve this without any problems.
The question(s): once the io_service
is run()
ing and the socket
opened, if I'm asked to change its options (i.e.: due to a change in the program configuration), can I do it with the socket opened? Do I need to close it before changing the options? Will it explode in my face if I don't close it? What is the best practice regarding this?
I wasn't able to find anything regarding this within the documentation.
Thank you in advance.