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

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

Issue 11364068: Add a QuicHttpStream class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move GetPeerAddress from QuicReliableClientStream to ReliableQuicStream 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 QuicSession, which demuxes a single connection to individual streams. 5 // A QuicSession, which demuxes a single connection to individual streams.
6 6
7 #ifndef NET_QUIC_QUIC_SESSION_H_ 7 #ifndef NET_QUIC_QUIC_SESSION_H_
8 #define NET_QUIC_QUIC_SESSION_H_ 8 #define NET_QUIC_QUIC_SESSION_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 QuicStreamOffset offset, bool fin); 44 QuicStreamOffset offset, bool fin);
45 // Called by streams when they want to close the stream in both directions. 45 // Called by streams when they want to close the stream in both directions.
46 void SendRstStream(QuicStreamId id, 46 void SendRstStream(QuicStreamId id,
47 QuicErrorCode error, 47 QuicErrorCode error,
48 QuicStreamOffset offset); 48 QuicStreamOffset offset);
49 49
50 // Removes the stream associated with 'stream_id' from the active stream map. 50 // Removes the stream associated with 'stream_id' from the active stream map.
51 virtual void CloseStream(QuicStreamId stream_id); 51 virtual void CloseStream(QuicStreamId stream_id);
52 52
53 // Returns true once the crypto handshake is complete. 53 // Returns true once the crypto handshake is complete.
54 virtual bool IsHandshakeComplete(); 54 virtual bool IsCryptoHandshakeComplete();
55
56 // Called by the QuicCryptoStream when the handshake completes.
57 // If |error| is QUIC_NO_ERROR then the handshake was succesful,
58 // otherwise it failed.
59 virtual void OnCryptoHandshakeComplete(QuicErrorCode error);
55 60
56 // Returns true if the stream existed previously and has been closed. 61 // Returns true if the stream existed previously and has been closed.
57 // Returns false if the stream is still active or if the stream has 62 // Returns false if the stream is still active or if the stream has
58 // not yet been created. 63 // not yet been created.
59 bool IsClosedStream(QuicStreamId id); 64 bool IsClosedStream(QuicStreamId id);
60 65
61 QuicConnection* connection() { return connection_.get(); } 66 QuicConnection* connection() { return connection_.get(); }
62 size_t num_active_requests() const { return stream_map_.size(); } 67 size_t num_active_requests() const { return stream_map_.size(); }
63 const IPEndPoint& peer_address() const { 68 const IPEndPoint& peer_address() const {
64 return connection_->peer_address(); 69 return connection_->peer_address();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 119
115 // Set of stream ids that have been "implicitly created" by receipt 120 // Set of stream ids that have been "implicitly created" by receipt
116 // of a stream id larger than the next expected stream id. 121 // of a stream id larger than the next expected stream id.
117 base::hash_set<QuicStreamId> implicitly_created_streams_; 122 base::hash_set<QuicStreamId> implicitly_created_streams_;
118 QuicStreamId largest_peer_created_stream_id_; 123 QuicStreamId largest_peer_created_stream_id_;
119 }; 124 };
120 125
121 } // namespace net 126 } // namespace net
122 127
123 #endif // NET_QUIC_QUIC_SESSION_H_ 128 #endif // NET_QUIC_QUIC_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698