| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 // Constructs a new session which will own |connection| and |helper|, but | 86 // Constructs a new session which will own |connection| and |helper|, but |
| 87 // not |stream_factory|, which must outlive this session. | 87 // not |stream_factory|, which must outlive this session. |
| 88 // TODO(rch): decouple the factory from the session via a Delegate interface. | 88 // TODO(rch): decouple the factory from the session via a Delegate interface. |
| 89 QuicClientSession(QuicConnection* connection, | 89 QuicClientSession(QuicConnection* connection, |
| 90 scoped_ptr<DatagramClientSocket> socket, | 90 scoped_ptr<DatagramClientSocket> socket, |
| 91 scoped_ptr<QuicDefaultPacketWriter> writer, | 91 scoped_ptr<QuicDefaultPacketWriter> writer, |
| 92 QuicStreamFactory* stream_factory, | 92 QuicStreamFactory* stream_factory, |
| 93 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 93 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
| 94 const std::string& server_hostname, | 94 const std::string& server_hostname, |
| 95 uint16 server_port, |
| 95 const QuicConfig& config, | 96 const QuicConfig& config, |
| 96 QuicCryptoClientConfig* crypto_config, | 97 QuicCryptoClientConfig* crypto_config, |
| 97 NetLog* net_log); | 98 NetLog* net_log); |
| 98 | 99 |
| 99 virtual ~QuicClientSession(); | 100 virtual ~QuicClientSession(); |
| 100 | 101 |
| 101 void AddObserver(Observer* observer); | 102 void AddObserver(Observer* observer); |
| 102 void RemoveObserver(Observer* observer); | 103 void RemoveObserver(Observer* observer); |
| 103 | 104 |
| 104 // Attempts to create a new stream. If the stream can be | 105 // Attempts to create a new stream. If the stream can be |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // Number of packets read in the current read loop. | 220 // Number of packets read in the current read loop. |
| 220 size_t num_packets_read_; | 221 size_t num_packets_read_; |
| 221 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 222 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
| 222 | 223 |
| 223 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 224 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
| 224 }; | 225 }; |
| 225 | 226 |
| 226 } // namespace net | 227 } // namespace net |
| 227 | 228 |
| 228 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 229 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
| OLD | NEW |