| Index: net/udp/udp_socket_win.cc
|
| diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
|
| index 1f0c337fd4a609fcb783bb0382345a88ab4ecd34..66570fe2c2fbf70332f1ddc6f001f9caf707285c 100644
|
| --- a/net/udp/udp_socket_win.cc
|
| +++ b/net/udp/udp_socket_win.cc
|
| @@ -752,4 +752,26 @@ int UDPSocketWin::SetMulticastLoopbackMode(bool loopback) {
|
| return OK;
|
| }
|
|
|
| +int UDPSocketLibevent::SetTos(DiffServCodePoint dscp) {
|
| + if (dscp == DSCP_NO_CHANGE) {
|
| + return OK;
|
| + }
|
| + int rv;
|
| + DWORD dscp_and_ecn = dscp << 2;
|
| + if (addr_family_ == AF_INET) {
|
| + rv = setsockopt(socket_, IPPROTO_IP, IP_TOS,
|
| + reinterpret_cast<const char*>(&dscp_and_ecn),
|
| + sizeof(dscp_and_ecn));
|
| + } else {
|
| + rv = setsockopt(socket_, IPPROTO_IPV6, IPV6_TCLASS,
|
| + reinterpret_cast<const char*>(&dscp_and_ecn),
|
| + sizeof(dscp_and_ecn));
|
| + }
|
| + if (rv < 0)
|
| + return MapSystemError(errno);
|
| +
|
| + return OK;
|
| +}
|
| +
|
| +
|
| } // namespace net
|
|
|