mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 15:39:41 -05:00
IP_TOS not supported before Windows7
This commit is contained in:
parent
462658df4f
commit
ee6f2cb71f
@ -160,13 +160,16 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
|||||||
boost::bind(&connection<t_protocol_handler>::handle_read, self,
|
boost::bind(&connection<t_protocol_handler>::handle_read, self,
|
||||||
boost::asio::placeholders::error,
|
boost::asio::placeholders::error,
|
||||||
boost::asio::placeholders::bytes_transferred)));
|
boost::asio::placeholders::bytes_transferred)));
|
||||||
|
#if !defined(_WIN32) || !defined(__i686)
|
||||||
|
// not supported before Windows7, too lazy for runtime check
|
||||||
|
// Just exclude for 32bit windows builds
|
||||||
//set ToS flag
|
//set ToS flag
|
||||||
int tos = get_tos_flag();
|
int tos = get_tos_flag();
|
||||||
boost::asio::detail::socket_option::integer< IPPROTO_IP, IP_TOS >
|
boost::asio::detail::socket_option::integer< IPPROTO_IP, IP_TOS >
|
||||||
optionTos( tos );
|
optionTos( tos );
|
||||||
socket_.set_option( optionTos );
|
socket_.set_option( optionTos );
|
||||||
//_dbg1("Set ToS flag to " << tos);
|
//_dbg1("Set ToS flag to " << tos);
|
||||||
|
#endif
|
||||||
|
|
||||||
boost::asio::ip::tcp::no_delay noDelayOption(false);
|
boost::asio::ip::tcp::no_delay noDelayOption(false);
|
||||||
socket_.set_option(noDelayOption);
|
socket_.set_option(noDelayOption);
|
||||||
|
Loading…
Reference in New Issue
Block a user