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

Side by Side Diff: net/spdy/spdy_session.h

Issue 287063003: Correct SpdySession StreamID exhaustion behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment tweaks. Created 6 years, 7 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 | « no previous file | net/spdy/spdy_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 #ifndef NET_SPDY_SPDY_SESSION_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream); 486 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream);
487 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, DeleteExpiredPushStreams); 487 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, DeleteExpiredPushStreams);
488 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ProtocolNegotiation); 488 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ProtocolNegotiation);
489 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClearSettings); 489 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClearSettings);
490 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustRecvWindowSize); 490 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustRecvWindowSize);
491 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustSendWindowSize); 491 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustSendWindowSize);
492 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlInactiveStream); 492 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlInactiveStream);
493 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlNoReceiveLeaks); 493 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlNoReceiveLeaks);
494 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlNoSendLeaks); 494 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlNoSendLeaks);
495 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlEndToEnd); 495 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlEndToEnd);
496 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, StreamIdSpaceExhausted);
496 497
497 typedef std::deque<base::WeakPtr<SpdyStreamRequest> > 498 typedef std::deque<base::WeakPtr<SpdyStreamRequest> >
498 PendingStreamRequestQueue; 499 PendingStreamRequestQueue;
499 500
500 struct ActiveStreamInfo { 501 struct ActiveStreamInfo {
501 ActiveStreamInfo(); 502 ActiveStreamInfo();
502 explicit ActiveStreamInfo(SpdyStream* stream); 503 explicit ActiveStreamInfo(SpdyStream* stream);
503 ~ActiveStreamInfo(); 504 ~ActiveStreamInfo();
504 505
505 SpdyStream* stream; 506 SpdyStream* stream;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 678
678 // Post a CheckPingStatus call after delay. Don't post if there is already 679 // Post a CheckPingStatus call after delay. Don't post if there is already
679 // CheckPingStatus running. 680 // CheckPingStatus running.
680 void PlanToCheckPingStatus(); 681 void PlanToCheckPingStatus();
681 682
682 // Check the status of the connection. It calls |CloseSessionOnError| if we 683 // Check the status of the connection. It calls |CloseSessionOnError| if we
683 // haven't received any data in |kHungInterval| time period. 684 // haven't received any data in |kHungInterval| time period.
684 void CheckPingStatus(base::TimeTicks last_check_time); 685 void CheckPingStatus(base::TimeTicks last_check_time);
685 686
686 // Get a new stream id. 687 // Get a new stream id.
687 int GetNewStreamId(); 688 SpdyStreamId GetNewStreamId();
688 689
689 // Pushes the given frame with the given priority into the write 690 // Pushes the given frame with the given priority into the write
690 // queue for the session. 691 // queue for the session.
691 void EnqueueSessionWrite(RequestPriority priority, 692 void EnqueueSessionWrite(RequestPriority priority,
692 SpdyFrameType frame_type, 693 SpdyFrameType frame_type,
693 scoped_ptr<SpdyFrame> frame); 694 scoped_ptr<SpdyFrame> frame);
694 695
695 // Puts |producer| associated with |stream| onto the write queue 696 // Puts |producer| associated with |stream| onto the write queue
696 // with the given priority. 697 // with the given priority.
697 void EnqueueWrite(RequestPriority priority, 698 void EnqueueWrite(RequestPriority priority,
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 // this to NULL after we are removed from the pool. 947 // this to NULL after we are removed from the pool.
947 SpdySessionPool* pool_; 948 SpdySessionPool* pool_;
948 const base::WeakPtr<HttpServerProperties> http_server_properties_; 949 const base::WeakPtr<HttpServerProperties> http_server_properties_;
949 950
950 // The socket handle for this session. 951 // The socket handle for this session.
951 scoped_ptr<ClientSocketHandle> connection_; 952 scoped_ptr<ClientSocketHandle> connection_;
952 953
953 // The read buffer used to read data from the socket. 954 // The read buffer used to read data from the socket.
954 scoped_refptr<IOBuffer> read_buffer_; 955 scoped_refptr<IOBuffer> read_buffer_;
955 956
956 int stream_hi_water_mark_; // The next stream id to use. 957 SpdyStreamId stream_hi_water_mark_; // The next stream id to use.
957 958
958 // Queue, for each priority, of pending stream requests that have 959 // Queue, for each priority, of pending stream requests that have
959 // not yet been satisfied. 960 // not yet been satisfied.
960 PendingStreamRequestQueue pending_create_stream_queues_[NUM_PRIORITIES]; 961 PendingStreamRequestQueue pending_create_stream_queues_[NUM_PRIORITIES];
961 962
962 // Map from stream id to all active streams. Streams are active in the sense 963 // Map from stream id to all active streams. Streams are active in the sense
963 // that they have a consumer (typically SpdyNetworkTransaction and regardless 964 // that they have a consumer (typically SpdyNetworkTransaction and regardless
964 // of whether or not there is currently any ongoing IO [might be waiting for 965 // of whether or not there is currently any ongoing IO [might be waiting for
965 // the server to start pushing the stream]) or there are still network events 966 // the server to start pushing the stream]) or there are still network events
966 // incoming even though the consumer has already gone away (cancellation). 967 // incoming even though the consumer has already gone away (cancellation).
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 // This SPDY proxy is allowed to push resources from origins that are 1125 // This SPDY proxy is allowed to push resources from origins that are
1125 // different from those of their associated streams. 1126 // different from those of their associated streams.
1126 HostPortPair trusted_spdy_proxy_; 1127 HostPortPair trusted_spdy_proxy_;
1127 1128
1128 TimeFunc time_func_; 1129 TimeFunc time_func_;
1129 }; 1130 };
1130 1131
1131 } // namespace net 1132 } // namespace net
1132 1133
1133 #endif // NET_SPDY_SPDY_SESSION_H_ 1134 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698