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

Side by Side Diff: content/renderer/p2p/socket_client.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 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_RENDERER_P2P_SOCKET_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
6 #define CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_ 6 #define CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // specified |address|. |address| matters only when |type| is set to 48 // specified |address|. |address| matters only when |type| is set to
49 // P2P_SOCKET_TCP_CLIENT. 49 // P2P_SOCKET_TCP_CLIENT.
50 void Init(P2PSocketType type, 50 void Init(P2PSocketType type,
51 const net::IPEndPoint& local_address, 51 const net::IPEndPoint& local_address,
52 const net::IPEndPoint& remote_address, 52 const net::IPEndPoint& remote_address,
53 Delegate* delegate); 53 Delegate* delegate);
54 54
55 // Send the |data| to the |address|. 55 // Send the |data| to the |address|.
56 void Send(const net::IPEndPoint& address, const std::vector<char>& data); 56 void Send(const net::IPEndPoint& address, const std::vector<char>& data);
57 57
58 // Send the |data| to the |address| using Differentiated Services Code Point
59 // |dscp|.
60 void SendWithDscp(const net::IPEndPoint& address,
Sergey Ulanov 2013/08/17 05:50:04 Do we expect to change dscp often? Maybe add SetTo
juberti2 2013/08/19 16:06:07 For hierarchically encoded video, we may change ds
hubbe 2013/08/21 18:51:36 I'll changing Send() to default to SendWithDscp(..
61 const std::vector<char>& data,
62 net::DiffServCodePoint dscp);
63
58 // Must be called before the socket is destroyed. The delegate may 64 // Must be called before the socket is destroyed. The delegate may
59 // not be called after |closed_task| is executed. 65 // not be called after |closed_task| is executed.
60 void Close(); 66 void Close();
61 67
62 int socket_id() const { return socket_id_; } 68 int socket_id() const { return socket_id_; }
63 69
64 void set_delegate(Delegate* delegate); 70 void set_delegate(Delegate* delegate);
65 71
66 private: 72 private:
67 enum State { 73 enum State {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 int socket_id_; 121 int socket_id_;
116 Delegate* delegate_; 122 Delegate* delegate_;
117 State state_; 123 State state_;
118 124
119 DISALLOW_COPY_AND_ASSIGN(P2PSocketClient); 125 DISALLOW_COPY_AND_ASSIGN(P2PSocketClient);
120 }; 126 };
121 127
122 } // namespace content 128 } // namespace content
123 129
124 #endif // CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_ 130 #endif // CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698