Loading server_http.hpp +9 −0 Original line number Diff line number Diff line Loading @@ -401,7 +401,16 @@ namespace SimpleWeb { if(!acceptor) acceptor = std::unique_ptr<asio::ip::tcp::acceptor>(new asio::ip::tcp::acceptor(*io_service)); try { acceptor->open(endpoint.protocol()); } catch (const system_error& error) { if(error.code() == asio::error::address_family_not_supported && config.address.empty()) { endpoint = asio::ip::tcp::endpoint(asio::ip::tcp::v4(), config.port); acceptor->open(endpoint.protocol()); } else { throw; } } acceptor->set_option(asio::socket_base::reuse_address(config.reuse_address)); if(config.fast_open) { #if defined(__linux__) && defined(TCP_FASTOPEN) Loading Loading
server_http.hpp +9 −0 Original line number Diff line number Diff line Loading @@ -401,7 +401,16 @@ namespace SimpleWeb { if(!acceptor) acceptor = std::unique_ptr<asio::ip::tcp::acceptor>(new asio::ip::tcp::acceptor(*io_service)); try { acceptor->open(endpoint.protocol()); } catch (const system_error& error) { if(error.code() == asio::error::address_family_not_supported && config.address.empty()) { endpoint = asio::ip::tcp::endpoint(asio::ip::tcp::v4(), config.port); acceptor->open(endpoint.protocol()); } else { throw; } } acceptor->set_option(asio::socket_base::reuse_address(config.reuse_address)); if(config.fast_open) { #if defined(__linux__) && defined(TCP_FASTOPEN) Loading