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_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 6 #define NET_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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 size_t bytes_written() const; | 82 size_t bytes_written() const; |
83 bool buffer_body() const { return buffer_body_; } | 83 bool buffer_body() const { return buffer_body_; } |
84 void set_buffer_body(bool buffer_body) { buffer_body_ = buffer_body; } | 84 void set_buffer_body(bool buffer_body) { buffer_body_ = buffer_body; } |
85 | 85 |
86 // From QuicDataStream::Visitor | 86 // From QuicDataStream::Visitor |
87 virtual void OnClose(QuicDataStream* stream) OVERRIDE; | 87 virtual void OnClose(QuicDataStream* stream) OVERRIDE; |
88 | 88 |
89 // Configures client_ to take ownership of and use the writer. | 89 // Configures client_ to take ownership of and use the writer. |
90 // Must be called before initial connect. | 90 // Must be called before initial connect. |
91 void UseWriter(QuicPacketWriterWrapper* writer); | 91 void UseWriter(QuicPacketWriterWrapper* writer); |
92 // If the given GUID is nonzero, configures client_ to use a specific GUID | 92 // If the given ConnectionId is nonzero, configures client_ to use a specific |
93 // instead of a random one. | 93 // ConnectionId instead of a random one. |
94 void UseGuid(QuicGuid guid); | 94 void UseConnectionId(QuicConnectionId connection_id); |
95 | 95 |
96 // Returns NULL if the maximum number of streams have already been created. | 96 // Returns NULL if the maximum number of streams have already been created. |
97 QuicSpdyClientStream* GetOrCreateStream(); | 97 QuicSpdyClientStream* GetOrCreateStream(); |
98 | 98 |
99 QuicRstStreamErrorCode stream_error() { return stream_error_; } | 99 QuicRstStreamErrorCode stream_error() { return stream_error_; } |
100 QuicErrorCode connection_error(); | 100 QuicErrorCode connection_error(); |
101 | 101 |
102 QuicClient* client(); | 102 QuicClient* client(); |
103 | 103 |
104 // cert_common_name returns the common name value of the server's certificate, | 104 // cert_common_name returns the common name value of the server's certificate, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // client_. | 152 // client_. |
153 ProofVerifier* proof_verifier_; | 153 ProofVerifier* proof_verifier_; |
154 }; | 154 }; |
155 | 155 |
156 } // namespace test | 156 } // namespace test |
157 | 157 |
158 } // namespace tools | 158 } // namespace tools |
159 } // namespace net | 159 } // namespace net |
160 | 160 |
161 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 161 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |