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

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

Issue 1422533006: Merge GetIncomingDynamicStream and GetDynamicStream into a single GetOrCreateDynamicStream method i… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106419223
Patch Set: Created 5 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
« no previous file with comments | « no previous file | net/quic/quic_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 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 <map> 10 #include <map>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Return the reserved crypto stream. 219 // Return the reserved crypto stream.
220 virtual QuicCryptoStream* GetCryptoStream() = 0; 220 virtual QuicCryptoStream* GetCryptoStream() = 0;
221 221
222 // Adds 'stream' to the active stream map. 222 // Adds 'stream' to the active stream map.
223 virtual void ActivateStream(ReliableQuicStream* stream); 223 virtual void ActivateStream(ReliableQuicStream* stream);
224 224
225 // Returns the stream ID for a new outgoing stream, and increments the 225 // Returns the stream ID for a new outgoing stream, and increments the
226 // underlying counter. 226 // underlying counter.
227 QuicStreamId GetNextOutgoingStreamId(); 227 QuicStreamId GetNextOutgoingStreamId();
228 228
229 ReliableQuicStream* GetIncomingDynamicStream(QuicStreamId stream_id); 229 // Returns existing stream with id = |stream_id|. If no such stream exists,
230 230 // and |stream_id| is a peer-created id, then a new stream is created and
231 ReliableQuicStream* GetDynamicStream(const QuicStreamId stream_id); 231 // returned. However if |stream_id| is a locally-created id and no such stream
232 // exists, the connection is closed.
233 ReliableQuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id);
232 234
233 // This is called after every call other than OnConnectionClose from the 235 // This is called after every call other than OnConnectionClose from the
234 // QuicConnectionVisitor to allow post-processing once the work has been done. 236 // QuicConnectionVisitor to allow post-processing once the work has been done.
235 // In this case, it deletes streams given that it's safe to do so (no other 237 // In this case, it deletes streams given that it's safe to do so (no other
236 // operations are being done on the streams at this time) 238 // operations are being done on the streams at this time)
237 virtual void PostProcessAfterData(); 239 virtual void PostProcessAfterData();
238 240
239 StreamMap& static_streams() { return static_stream_map_; } 241 StreamMap& static_streams() { return static_stream_map_; }
240 const StreamMap& static_streams() const { return static_stream_map_; } 242 const StreamMap& static_streams() const { return static_stream_map_; }
241 243
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 337
336 // Indicate if there is pending data for the crypto stream. 338 // Indicate if there is pending data for the crypto stream.
337 bool has_pending_handshake_; 339 bool has_pending_handshake_;
338 340
339 DISALLOW_COPY_AND_ASSIGN(QuicSession); 341 DISALLOW_COPY_AND_ASSIGN(QuicSession);
340 }; 342 };
341 343
342 } // namespace net 344 } // namespace net
343 345
344 #endif // NET_QUIC_QUIC_SESSION_H_ 346 #endif // NET_QUIC_QUIC_SESSION_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698