How to set a timeout on blocking sockets in boost asio?
TL;DR socket.set_option(boost::asio::detail::socket_option::integer<SOL_SOCKET, SO_RCVTIMEO>{ 200 }); FULL ANSWER This question keep being asked over and over again for many years. Answers I saw so far are quite poor. I’ll add this info right here in one of the first occurrences of this question. Everybody trying to use ASIO to simplify their networking code would be perfectly … Read more