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_CONNECTION_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
10 #include "net/quic/quic_connection_stats.h" | 10 #include "net/quic/quic_connection_stats.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 static bool IsValidEntropy(QuicConnection* connection, | 67 static bool IsValidEntropy(QuicConnection* connection, |
68 QuicPacketSequenceNumber largest_observed, | 68 QuicPacketSequenceNumber largest_observed, |
69 const SequenceNumberSet& missing_packets, | 69 const SequenceNumberSet& missing_packets, |
70 QuicPacketEntropyHash entropy_hash); | 70 QuicPacketEntropyHash entropy_hash); |
71 | 71 |
72 static QuicPacketEntropyHash ReceivedEntropyHash( | 72 static QuicPacketEntropyHash ReceivedEntropyHash( |
73 QuicConnection* connection, | 73 QuicConnection* connection, |
74 QuicPacketSequenceNumber sequence_number); | 74 QuicPacketSequenceNumber sequence_number); |
75 | 75 |
| 76 static bool IsWriteBlocked(QuicConnection* connection); |
| 77 |
| 78 static void SetIsWriteBlocked(QuicConnection* connection, bool write_blocked); |
| 79 |
76 static bool IsServer(QuicConnection* connection); | 80 static bool IsServer(QuicConnection* connection); |
77 | 81 |
78 static void SetIsServer(QuicConnection* connection, bool is_server); | 82 static void SetIsServer(QuicConnection* connection, bool is_server); |
79 | 83 |
80 static void SetSelfAddress(QuicConnection* connection, | 84 static void SetSelfAddress(QuicConnection* connection, |
81 const IPEndPoint& self_address); | 85 const IPEndPoint& self_address); |
82 | 86 |
83 static void SetPeerAddress(QuicConnection* connection, | 87 static void SetPeerAddress(QuicConnection* connection, |
84 const IPEndPoint& peer_address); | 88 const IPEndPoint& peer_address); |
85 | 89 |
86 static void SwapCrypters(QuicConnection* connection, QuicFramer* framer); | 90 static void SwapCrypters(QuicConnection* connection, QuicFramer* framer); |
87 | 91 |
88 static QuicConnectionHelperInterface* GetHelper(QuicConnection* connection); | 92 static QuicConnectionHelperInterface* GetHelper(QuicConnection* connection); |
89 | 93 |
90 static QuicFramer* GetFramer(QuicConnection* connection); | 94 static QuicFramer* GetFramer(QuicConnection* connection); |
91 | 95 |
92 // Set last_header_->fec_group = fec_group and return connection->GetFecGroup | 96 // Set last_header_->fec_group = fec_group and return connection->GetFecGroup |
93 static QuicFecGroup* GetFecGroup(QuicConnection* connection, int fec_group); | 97 static QuicFecGroup* GetFecGroup(QuicConnection* connection, int fec_group); |
94 | 98 |
95 static QuicAlarm* GetAckAlarm(QuicConnection* connection); | 99 static QuicAlarm* GetAckAlarm(QuicConnection* connection); |
96 static QuicAlarm* GetRetransmissionAlarm(QuicConnection* connection); | 100 static QuicAlarm* GetRetransmissionAlarm(QuicConnection* connection); |
97 static QuicAlarm* GetSendAlarm(QuicConnection* connection); | 101 static QuicAlarm* GetSendAlarm(QuicConnection* connection); |
| 102 static QuicAlarm* GetResumeWritesAlarm(QuicConnection* connection); |
98 static QuicAlarm* GetTimeoutAlarm(QuicConnection* connection); | 103 static QuicAlarm* GetTimeoutAlarm(QuicConnection* connection); |
99 | 104 |
100 private: | 105 private: |
101 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); | 106 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); |
102 }; | 107 }; |
103 | 108 |
104 } // namespace test | 109 } // namespace test |
105 } // namespace net | 110 } // namespace net |
106 | 111 |
107 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PEER_H_ | 112 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PEER_H_ |
OLD | NEW |