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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host.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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/common/p2p_sockets.h" 9 #include "content/common/p2p_sockets.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 #include "net/udp/datagram_socket.h"
11 12
12 namespace IPC { 13 namespace IPC {
13 class Sender; 14 class Sender;
14 } 15 }
15 16
16 namespace net { 17 namespace net {
17 class URLRequestContextGetter; 18 class URLRequestContextGetter;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
(...skipping 11 matching lines...) Expand all
32 33
33 virtual ~P2PSocketHost(); 34 virtual ~P2PSocketHost();
34 35
35 // Initalizes the socket. Returns false when initiazations fails. 36 // Initalizes the socket. Returns false when initiazations fails.
36 virtual bool Init(const net::IPEndPoint& local_address, 37 virtual bool Init(const net::IPEndPoint& local_address,
37 const net::IPEndPoint& remote_address) = 0; 38 const net::IPEndPoint& remote_address) = 0;
38 39
39 // Sends |data| on the socket to |to|. 40 // Sends |data| on the socket to |to|.
40 virtual void Send(const net::IPEndPoint& to, 41 virtual void Send(const net::IPEndPoint& to,
41 const std::vector<char>& data, 42 const std::vector<char>& data,
43 net::DiffServCodePoint dscp,
42 uint64 packet_id) = 0; 44 uint64 packet_id) = 0;
43 45
44 virtual P2PSocketHost* AcceptIncomingTcpConnection( 46 virtual P2PSocketHost* AcceptIncomingTcpConnection(
45 const net::IPEndPoint& remote_address, int id) = 0; 47 const net::IPEndPoint& remote_address, int id) = 0;
46 48
47 protected: 49 protected:
48 friend class P2PSocketHostTcpTestBase; 50 friend class P2PSocketHostTcpTestBase;
49 51
50 // TODO(mallinath) - Remove this below enum and use one defined in 52 // TODO(mallinath) - Remove this below enum and use one defined in
51 // libjingle/souce/talk/p2p/base/stun.h 53 // libjingle/souce/talk/p2p/base/stun.h
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 IPC::Sender* message_sender_; 94 IPC::Sender* message_sender_;
93 int id_; 95 int id_;
94 State state_; 96 State state_;
95 97
96 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); 98 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
97 }; 99 };
98 100
99 } // namespace content 101 } // namespace content
100 102
101 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 103 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/p2p/socket_dispatcher_host.cc ('k') | content/browser/renderer_host/p2p/socket_host_tcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698