OLD | NEW |
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 #include "net/quic/quic_session.h" | 5 #include "net/quic/quic_session.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/crypto/proof_verifier.h" | 8 #include "net/quic/crypto/proof_verifier.h" |
9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_flow_controller.h" | 10 #include "net/quic/quic_flow_controller.h" |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 LOG(ERROR) << "Trying to get stream: " << stream_id | 652 LOG(ERROR) << "Trying to get stream: " << stream_id |
653 << ", largest peer created stream: " | 653 << ", largest peer created stream: " |
654 << largest_peer_created_stream_id_ | 654 << largest_peer_created_stream_id_ |
655 << ", max delta: " << kMaxStreamIdDelta; | 655 << ", max delta: " << kMaxStreamIdDelta; |
656 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); | 656 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); |
657 } | 657 } |
658 return nullptr; | 658 return nullptr; |
659 } | 659 } |
660 if (largest_peer_created_stream_id_ == 0) { | 660 if (largest_peer_created_stream_id_ == 0) { |
661 if (is_server()) { | 661 if (is_server()) { |
662 largest_peer_created_stream_id_= 3; | 662 largest_peer_created_stream_id_ = 3; |
663 } else { | 663 } else { |
664 largest_peer_created_stream_id_= 1; | 664 largest_peer_created_stream_id_ = 1; |
665 } | 665 } |
666 } | 666 } |
667 for (QuicStreamId id = largest_peer_created_stream_id_ + 2; | 667 for (QuicStreamId id = largest_peer_created_stream_id_ + 2; |
668 id < stream_id; | 668 id < stream_id; |
669 id += 2) { | 669 id += 2) { |
670 implicitly_created_streams_.insert(id); | 670 implicitly_created_streams_.insert(id); |
671 } | 671 } |
672 largest_peer_created_stream_id_ = stream_id; | 672 largest_peer_created_stream_id_ = stream_id; |
673 } | 673 } |
674 QuicDataStream* stream = CreateIncomingDataStream(stream_id); | 674 QuicDataStream* stream = CreateIncomingDataStream(stream_id); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 for (DataStreamMap::iterator it = stream_map_.begin(); | 778 for (DataStreamMap::iterator it = stream_map_.begin(); |
779 it != stream_map_.end(); ++it) { | 779 it != stream_map_.end(); ++it) { |
780 if (it->second->flow_controller()->IsBlocked()) { | 780 if (it->second->flow_controller()->IsBlocked()) { |
781 return true; | 781 return true; |
782 } | 782 } |
783 } | 783 } |
784 return false; | 784 return false; |
785 } | 785 } |
786 | 786 |
787 } // namespace net | 787 } // namespace net |
OLD | NEW |