OLD | NEW |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // From QuicDataStream::Visitor | 131 // From QuicDataStream::Visitor |
132 virtual void OnClose(QuicDataStream* stream) OVERRIDE; | 132 virtual void OnClose(QuicDataStream* stream) OVERRIDE; |
133 | 133 |
134 // Configures client_ to take ownership of and use the writer. | 134 // Configures client_ to take ownership of and use the writer. |
135 // Must be called before initial connect. | 135 // Must be called before initial connect. |
136 void UseWriter(QuicPacketWriterWrapper* writer); | 136 void UseWriter(QuicPacketWriterWrapper* writer); |
137 // If the given ConnectionId is nonzero, configures client_ to use a specific | 137 // If the given ConnectionId is nonzero, configures client_ to use a specific |
138 // ConnectionId instead of a random one. | 138 // ConnectionId instead of a random one. |
139 void UseConnectionId(QuicConnectionId connection_id); | 139 void UseConnectionId(QuicConnectionId connection_id); |
140 | 140 |
141 // Returns NULL if the maximum number of streams have already been created. | 141 // Returns nullptr if the maximum number of streams have already been created. |
142 QuicSpdyClientStream* GetOrCreateStream(); | 142 QuicSpdyClientStream* GetOrCreateStream(); |
143 | 143 |
144 QuicRstStreamErrorCode stream_error() { return stream_error_; } | 144 QuicRstStreamErrorCode stream_error() { return stream_error_; } |
145 QuicErrorCode connection_error(); | 145 QuicErrorCode connection_error(); |
146 | 146 |
147 MockableQuicClient* client(); | 147 MockableQuicClient* client(); |
148 | 148 |
149 // cert_common_name returns the common name value of the server's certificate, | 149 // cert_common_name returns the common name value of the server's certificate, |
150 // or the empty string if no certificate was presented. | 150 // or the empty string if no certificate was presented. |
151 const string& cert_common_name() const; | 151 const string& cert_common_name() const; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 208 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
209 }; | 209 }; |
210 | 210 |
211 } // namespace test | 211 } // namespace test |
212 | 212 |
213 } // namespace tools | 213 } // namespace tools |
214 } // namespace net | 214 } // namespace net |
215 | 215 |
216 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 216 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |