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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.h

Issue 338623002: Added FEC policy per stream, which is translated to an FEC protection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.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_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // or the empty string if no certificate was presented. 144 // or the empty string if no certificate was presented.
145 const string& cert_common_name() const; 145 const string& cert_common_name() const;
146 146
147 // Get the server config map. 147 // Get the server config map.
148 QuicTagValueMap GetServerConfig() const; 148 QuicTagValueMap GetServerConfig() const;
149 149
150 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } 150 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; }
151 151
152 void set_priority(QuicPriority priority) { priority_ = priority; } 152 void set_priority(QuicPriority priority) { priority_ = priority; }
153 153
154 // Sets client's FEC policy. This policy applies to the data stream(s), and
155 // also to the headers and crypto streams.
156 void SetFecPolicy(FecPolicy fec_policy);
157
154 void WaitForWriteToFlush(); 158 void WaitForWriteToFlush();
155 159
156 protected: 160 protected:
157 QuicTestClient(); 161 QuicTestClient();
158 162
159 void Initialize(bool secure); 163 void Initialize(bool secure);
160 164
161 void set_client(MockableQuicClient* client) { client_.reset(client); } 165 void set_client(MockableQuicClient* client) { client_.reset(client); }
162 166
163 private: 167 private:
(...skipping 15 matching lines...) Expand all
179 int64 response_body_size_; 183 int64 response_body_size_;
180 // True if we tried to connect already since the last call to Disconnect(). 184 // True if we tried to connect already since the last call to Disconnect().
181 bool connect_attempted_; 185 bool connect_attempted_;
182 bool secure_; 186 bool secure_;
183 // The client will auto-connect exactly once before sending data. If 187 // The client will auto-connect exactly once before sending data. If
184 // something causes a connection reset, it will not automatically reconnect 188 // something causes a connection reset, it will not automatically reconnect
185 // unless auto_reconnect_ is true. 189 // unless auto_reconnect_ is true.
186 bool auto_reconnect_; 190 bool auto_reconnect_;
187 // Should we buffer the response body? Defaults to true. 191 // Should we buffer the response body? Defaults to true.
188 bool buffer_body_; 192 bool buffer_body_;
189 193 // FEC policy for data sent by this client
194 FecPolicy fec_policy_;
190 // proof_verifier_ points to a RecordingProofVerifier that is owned by 195 // proof_verifier_ points to a RecordingProofVerifier that is owned by
191 // client_. 196 // client_.
192 ProofVerifier* proof_verifier_; 197 ProofVerifier* proof_verifier_;
193 198
194 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); 199 DISALLOW_COPY_AND_ASSIGN(QuicTestClient);
195 }; 200 };
196 201
197 } // namespace test 202 } // namespace test
198 203
199 } // namespace tools 204 } // namespace tools
200 } // namespace net 205 } // namespace net
201 206
202 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 207 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698