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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 22 matching lines...) Expand all Loading... |
33 uint32_t max_streams); | 33 uint32_t max_streams); |
34 static void SetMaxOpenOutgoingStreams(QuicSession* session, | 34 static void SetMaxOpenOutgoingStreams(QuicSession* session, |
35 uint32_t max_streams); | 35 uint32_t max_streams); |
36 static QuicCryptoStream* GetCryptoStream(QuicSession* session); | 36 static QuicCryptoStream* GetCryptoStream(QuicSession* session); |
37 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session); | 37 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session); |
38 static ReliableQuicStream* GetOrCreateDynamicStream(QuicSession* session, | 38 static ReliableQuicStream* GetOrCreateDynamicStream(QuicSession* session, |
39 QuicStreamId stream_id); | 39 QuicStreamId stream_id); |
40 static std::map<QuicStreamId, QuicStreamOffset>& | 40 static std::map<QuicStreamId, QuicStreamOffset>& |
41 GetLocallyClosedStreamsHighestOffset(QuicSession* session); | 41 GetLocallyClosedStreamsHighestOffset(QuicSession* session); |
42 static QuicSession::StaticStreamMap& static_streams(QuicSession* session); | 42 static QuicSession::StaticStreamMap& static_streams(QuicSession* session); |
| 43 static QuicSession::DynamicStreamMap& dynamic_streams(QuicSession* session); |
43 static std::unordered_set<QuicStreamId>* GetDrainingStreams( | 44 static std::unordered_set<QuicStreamId>* GetDrainingStreams( |
44 QuicSession* session); | 45 QuicSession* session); |
45 static void ActivateStream(QuicSession* session, | 46 static void ActivateStream(QuicSession* session, |
46 std::unique_ptr<ReliableQuicStream> stream); | 47 std::unique_ptr<ReliableQuicStream> stream); |
47 | 48 |
48 // Discern the state of a stream. Exactly one of these should be true at a | 49 // Discern the state of a stream. Exactly one of these should be true at a |
49 // time for any stream id > 0 (other than the special streams 1 and 3). | 50 // time for any stream id > 0 (other than the special streams 1 and 3). |
50 static bool IsStreamClosed(QuicSession* session, QuicStreamId id); | 51 static bool IsStreamClosed(QuicSession* session, QuicStreamId id); |
51 static bool IsStreamCreated(QuicSession* session, QuicStreamId id); | 52 static bool IsStreamCreated(QuicSession* session, QuicStreamId id); |
52 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id); | 53 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id); |
53 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id); | 54 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id); |
54 | 55 |
55 private: | 56 private: |
56 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer); | 57 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace test | 60 } // namespace test |
60 | 61 |
61 } // namespace net | 62 } // namespace net |
62 | 63 |
63 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ | 64 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ |
OLD | NEW |