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

Side by Side 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: win fix Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/udp/udp_server_socket.cc ('k') | net/udp/udp_socket_libevent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_ 5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_
6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_ 6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Note: the behavior of |SetMulticastLoopbackMode| is slightly 145 // Note: the behavior of |SetMulticastLoopbackMode| is slightly
146 // different between Windows and Unix-like systems. The inconsistency only 146 // different between Windows and Unix-like systems. The inconsistency only
147 // happens when there are more than one applications on the same host 147 // happens when there are more than one applications on the same host
148 // joined to the same multicast group while having different settings on 148 // joined to the same multicast group while having different settings on
149 // multicast loopback mode. On Windows, the applications with loopback off 149 // multicast loopback mode. On Windows, the applications with loopback off
150 // will not RECEIVE the loopback packets; while on Unix-like systems, the 150 // will not RECEIVE the loopback packets; while on Unix-like systems, the
151 // applications with loopback off will not SEND the loopback packets to 151 // applications with loopback off will not SEND the loopback packets to
152 // other applications on the same host. See MSDN: http://goo.gl/6vqbj 152 // other applications on the same host. See MSDN: http://goo.gl/6vqbj
153 int SetMulticastLoopbackMode(bool loopback); 153 int SetMulticastLoopbackMode(bool loopback);
154 154
155 // Set the differentiated services flags on outgoing packets. May not
156 // do anything on some platforms.
157 // Return a network error code.
158 int SetDiffServCodePoint(DiffServCodePoint dscp);
159
155 private: 160 private:
156 enum SocketOptions { 161 enum SocketOptions {
157 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, 162 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0,
158 SOCKET_OPTION_BROADCAST = 1 << 1, 163 SOCKET_OPTION_BROADCAST = 1 << 1,
159 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 164 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2
160 }; 165 };
161 166
162 class ReadWatcher : public base::MessageLoopForIO::Watcher { 167 class ReadWatcher : public base::MessageLoopForIO::Watcher {
163 public: 168 public:
164 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {} 169 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {}
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 CompletionCallback write_callback_; 278 CompletionCallback write_callback_;
274 279
275 BoundNetLog net_log_; 280 BoundNetLog net_log_;
276 281
277 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent); 282 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent);
278 }; 283 };
279 284
280 } // namespace net 285 } // namespace net
281 286
282 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_ 287 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_
OLDNEW
« 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