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

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: 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
« no previous file with comments | « net/udp/udp_server_socket.cc ('k') | net/udp/udp_socket_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..69bd1c6541adb265b8612b4d62f3be0a8b0df7c7 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,15 @@ 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.
+ // Some useful values:
+ // 46 (Expedited Forwarding) for telephony
+ // 34 (AF4) for interactive multimedia
+ // 26 (AF3) multimedia streaming
+ // 10 (AF1) bulk transfers
+ int SetToS(int dscp);
Alpha Left Google 2013/08/07 00:45:16 Should we provide a enum include file that lists a
hubbe 2013/08/07 17:20:35 Done.
+
private:
static const int kInvalidSocket = -1;
@@ -233,6 +242,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// options that should be applied to |socket_| before Bind().
int socket_options_;
+ // Differentiated Services Code Point.
+ int dscp_;
+
// Multicast socket options cached for SetSocketOption.
// Cannot be used after Bind().
int multicast_time_to_live_;
« no previous file with comments | « net/udp/udp_server_socket.cc ('k') | net/udp/udp_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698