Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1443)

Unified Diff: net/udp/udp_socket_libevent.h

Issue 22381012: Allow p2p UDP packages to set DSCP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extra newline removed Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/udp/udp_socket_libevent.h
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 8f68a9b57a90695a87101eca856448198daedffb..30a788465f3f3b6e997c3cc2a856ba8360ef1860 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -21,7 +21,7 @@ namespace net {
class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
public:
- UDPSocketLibevent(DatagramSocket::BindType bind_type,
+ UDPSocketLibevent(DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
const net::NetLog::Source& source);
@@ -151,6 +151,10 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// other applications on the same host. See MSDN: http://goo.gl/6vqbj
int SetMulticastLoopbackMode(bool loopback);
+ // Set the differentiated services flags on outgoing packets. May not
+ // do anything on some platforms.
+ int SetToS(DiffServCodePoint dscp);
+
private:
static const int kInvalidSocket = -1;
@@ -237,6 +241,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// Cannot be used after Bind().
int multicast_time_to_live_;
+ // Differentiated Services Code Point.
+ DiffServCodePoint dscp_;
+
// How to do source port binding, used only when UDPSocket is part of
// UDPClientSocket, since UDPServerSocket provides Bind.
DatagramSocket::BindType bind_type_;

Powered by Google App Engine
This is Rietveld 408576698