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

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

Issue 11364068: Add a QuicHttpStream class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bugs Created 8 years, 1 month 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
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. 5 // A client specific QuicSession subclass.
6 6
7 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ 7 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_
8 #define NET_QUIC_QUIC_CLIENT_SESSION_H_ 8 #define NET_QUIC_QUIC_CLIENT_SESSION_H_
9 9
10 #include "base/hash_tables.h"
10 #include "net/base/completion_callback.h" 11 #include "net/base/completion_callback.h"
11 #include "net/quic/quic_crypto_client_stream.h" 12 #include "net/quic/quic_crypto_client_stream.h"
12 #include "net/quic/quic_reliable_client_stream.h" 13 #include "net/quic/quic_reliable_client_stream.h"
13 #include "net/quic/quic_session.h" 14 #include "net/quic/quic_session.h"
14 15
15 namespace net { 16 namespace net {
16 17
17 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession { 18 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession {
18 public: 19 public:
19 explicit QuicClientSession(QuicConnection* connection); 20 explicit QuicClientSession(QuicConnection* connection);
20 21
21 virtual ~QuicClientSession(); 22 virtual ~QuicClientSession();
22 23
23 // QuicSession methods: 24 // QuicSession methods:
24 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; 25 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE;
willchan no longer on Chromium 2012/11/21 22:50:03 Y'know, if we wanted to leverage it, we could use
Ryan Hamilton 2012/11/21 23:06:35 I don't think that would make sense, because the s
25 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; 26 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE;
27 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE;
26 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE; 28 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE;
27 29
28 // Perform a crypto handshake with the server. 30 // Perform a crypto handshake with the server.
29 int CryptoConnect(const CompletionCallback& callback); 31 int CryptoConnect(const CompletionCallback& callback);
30 32
31 protected: 33 protected:
32 // QuicSession methods: 34 // QuicSession methods:
33 virtual ReliableQuicStream* CreateIncomingReliableStream( 35 virtual ReliableQuicStream* CreateIncomingReliableStream(
34 QuicStreamId id) OVERRIDE; 36 QuicStreamId id) OVERRIDE;
35 37
36 private: 38 private:
39 typedef base::hash_map<QuicStreamId, ReliableQuicStream*> StreamMap;
37 QuicCryptoClientStream crypto_stream_; 40 QuicCryptoClientStream crypto_stream_;
41 StreamMap streams_;
38 42
39 CompletionCallback callback_; 43 CompletionCallback callback_;
40 44
41 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 45 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
42 }; 46 };
43 47
44 } // namespace net 48 } // namespace net
45 49
46 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 50 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/quic/quic_client_session.cc » ('j') | net/quic/quic_client_session.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698