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 // A client specific QuicSession subclass. This class owns the underlying | 5 // A client specific QuicSession subclass. This class owns the underlying |
6 // QuicConnection and QuicConnectionHelper objects. The connection stores | 6 // QuicConnection and QuicConnectionHelper objects. The connection stores |
7 // a non-owning pointer to the helper so this session needs to ensure that | 7 // a non-owning pointer to the helper so this session needs to ensure that |
8 // the helper outlives the connection. | 8 // the helper outlives the connection. |
9 | 9 |
10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 QuicClientSession(QuicConnection* connection, | 87 QuicClientSession(QuicConnection* connection, |
88 scoped_ptr<DatagramClientSocket> socket, | 88 scoped_ptr<DatagramClientSocket> socket, |
89 scoped_ptr<QuicDefaultPacketWriter> writer, | 89 scoped_ptr<QuicDefaultPacketWriter> writer, |
90 QuicStreamFactory* stream_factory, | 90 QuicStreamFactory* stream_factory, |
91 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 91 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
92 const std::string& server_hostname, | 92 const std::string& server_hostname, |
93 const QuicConfig& config, | 93 const QuicConfig& config, |
94 QuicCryptoClientConfig* crypto_config, | 94 QuicCryptoClientConfig* crypto_config, |
95 NetLog* net_log); | 95 NetLog* net_log); |
96 | 96 |
97 virtual ~QuicClientSession(); | 97 virtual ~QuicClientSession() OVERRIDE; |
98 | 98 |
99 void AddObserver(Observer* observer); | 99 void AddObserver(Observer* observer); |
100 void RemoveObserver(Observer* observer); | 100 void RemoveObserver(Observer* observer); |
101 | 101 |
102 // Attempts to create a new stream. If the stream can be | 102 // Attempts to create a new stream. If the stream can be |
103 // created immediately, returns OK. If the open stream limit | 103 // created immediately, returns OK. If the open stream limit |
104 // has been reached, returns ERR_IO_PENDING, and |request| | 104 // has been reached, returns ERR_IO_PENDING, and |request| |
105 // will be added to the stream requets queue and will | 105 // will be added to the stream requets queue and will |
106 // be completed asynchronously. | 106 // be completed asynchronously. |
107 // TODO(rch): remove |stream| from this and use setter on |request| | 107 // TODO(rch): remove |stream| from this and use setter on |request| |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // Number of packets read in the current read loop. | 216 // Number of packets read in the current read loop. |
217 size_t num_packets_read_; | 217 size_t num_packets_read_; |
218 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 218 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 220 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace net | 223 } // namespace net |
224 | 224 |
225 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 225 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |