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

Side by Side Diff: net/quic/quic_client_session.h

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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/quic/crypto/crypto_utils.cc ('k') | net/quic/quic_client_session.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 // 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 18 matching lines...) Expand all
29 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession { 29 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession {
30 public: 30 public:
31 // Constructs a new session which will own |connection| and |helper|, but 31 // Constructs a new session which will own |connection| and |helper|, but
32 // not |stream_factory|, which must outlive this session. 32 // not |stream_factory|, which must outlive this session.
33 // TODO(rch): decouple the factory from the session via a Delegate interface. 33 // TODO(rch): decouple the factory from the session via a Delegate interface.
34 QuicClientSession(QuicConnection* connection, 34 QuicClientSession(QuicConnection* connection,
35 DatagramClientSocket* socket, 35 DatagramClientSocket* socket,
36 QuicStreamFactory* stream_factory, 36 QuicStreamFactory* stream_factory,
37 QuicCryptoClientStreamFactory* crypto_client_stream_factory, 37 QuicCryptoClientStreamFactory* crypto_client_stream_factory,
38 const std::string& server_hostname, 38 const std::string& server_hostname,
39 QuicCryptoClientConfig* crypto_config,
39 NetLog* net_log); 40 NetLog* net_log);
40 41
41 virtual ~QuicClientSession(); 42 virtual ~QuicClientSession();
42 43
43 // QuicSession methods: 44 // QuicSession methods:
44 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; 45 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE;
45 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; 46 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE;
46 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE; 47 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE;
47 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE; 48 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE;
48 49
(...skipping 14 matching lines...) Expand all
63 protected: 64 protected:
64 // QuicSession methods: 65 // QuicSession methods:
65 virtual ReliableQuicStream* CreateIncomingReliableStream( 66 virtual ReliableQuicStream* CreateIncomingReliableStream(
66 QuicStreamId id) OVERRIDE; 67 QuicStreamId id) OVERRIDE;
67 68
68 private: 69 private:
69 // A completion callback invoked when a read completes. 70 // A completion callback invoked when a read completes.
70 void OnReadComplete(int result); 71 void OnReadComplete(int result);
71 72
72 base::WeakPtrFactory<QuicClientSession> weak_factory_; 73 base::WeakPtrFactory<QuicClientSession> weak_factory_;
74 // config_ contains non-crypto configuration options negotiated in the crypto
75 // handshake.
76 QuicConfig config_;
73 scoped_ptr<QuicCryptoClientStream> crypto_stream_; 77 scoped_ptr<QuicCryptoClientStream> crypto_stream_;
74 QuicStreamFactory* stream_factory_; 78 QuicStreamFactory* stream_factory_;
75 scoped_ptr<DatagramClientSocket> socket_; 79 scoped_ptr<DatagramClientSocket> socket_;
76 scoped_refptr<IOBufferWithSize> read_buffer_; 80 scoped_refptr<IOBufferWithSize> read_buffer_;
77 bool read_pending_; 81 bool read_pending_;
78 CompletionCallback callback_; 82 CompletionCallback callback_;
79 size_t num_total_streams_; 83 size_t num_total_streams_;
80 BoundNetLog net_log_; 84 BoundNetLog net_log_;
81 QuicConnectionLogger logger_; 85 QuicConnectionLogger logger_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 87 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
84 }; 88 };
85 89
86 } // namespace net 90 } // namespace net
87 91
88 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 92 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_utils.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698