added option to control TOS byte in peer traffic

This commit is contained in:
Arvid Norberg
2008-03-12 16:58:23 +00:00
parent 5173c7fe31
commit 8132c6aad6
7 changed files with 112 additions and 0 deletions

View File

@@ -235,6 +235,9 @@ namespace libtorrent
(*m_logger) << "*** INCOMING CONNECTION\n";
#endif
if (m_remote.address().is_v4())
m_socket->set_option(type_of_service(ses.settings().peer_tos), ec);
#ifndef NDEBUG
piece_failed = false;
#endif
@@ -3011,6 +3014,12 @@ namespace libtorrent
<< " rtt = " << m_rtt << "\n";
#endif
if (m_remote.address().is_v4())
{
asio::error_code ec;
m_socket->set_option(type_of_service(m_ses.settings().peer_tos), ec);
}
on_connected();
setup_send();
setup_receive();