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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 QuicConnection* connection, | 71 QuicConnection* connection, |
72 QuicPacketSequenceNumber sequence_number); | 72 QuicPacketSequenceNumber sequence_number); |
73 | 73 |
74 static bool IsServer(QuicConnection* connection); | 74 static bool IsServer(QuicConnection* connection); |
75 | 75 |
76 static void SetIsServer(QuicConnection* connection, bool is_server); | 76 static void SetIsServer(QuicConnection* connection, bool is_server); |
77 | 77 |
78 static void SetSelfAddress(QuicConnection* connection, | 78 static void SetSelfAddress(QuicConnection* connection, |
79 const IPEndPoint& self_address); | 79 const IPEndPoint& self_address); |
80 | 80 |
| 81 static void SetPeerAddress(QuicConnection* connection, |
| 82 const IPEndPoint& peer_address); |
| 83 |
81 static void SwapCrypters(QuicConnection* connection, QuicFramer* framer); | 84 static void SwapCrypters(QuicConnection* connection, QuicFramer* framer); |
82 | 85 |
83 static void SetMaxPacketsPerRetransmissionAlarm(QuicConnection* connection, | 86 static void SetMaxPacketsPerRetransmissionAlarm(QuicConnection* connection, |
84 int max_packets); | 87 int max_packets); |
85 | 88 |
86 static QuicConnectionHelperInterface* GetHelper(QuicConnection* connection); | 89 static QuicConnectionHelperInterface* GetHelper(QuicConnection* connection); |
87 | 90 |
88 static QuicFramer* GetFramer(QuicConnection* connection); | 91 static QuicFramer* GetFramer(QuicConnection* connection); |
89 | 92 |
90 // Set last_header_->fec_group = fec_group and return connection->GetFecGroup | 93 // Set last_header_->fec_group = fec_group and return connection->GetFecGroup |
91 static QuicFecGroup* GetFecGroup(QuicConnection* connection, int fec_group); | 94 static QuicFecGroup* GetFecGroup(QuicConnection* connection, int fec_group); |
92 | 95 |
93 static QuicAlarm* GetAckAlarm(QuicConnection* connection); | 96 static QuicAlarm* GetAckAlarm(QuicConnection* connection); |
94 static QuicAlarm* GetRetransmissionAlarm(QuicConnection* connection); | 97 static QuicAlarm* GetRetransmissionAlarm(QuicConnection* connection); |
95 static QuicAlarm* GetSendAlarm(QuicConnection* connection); | 98 static QuicAlarm* GetSendAlarm(QuicConnection* connection); |
96 static QuicAlarm* GetTimeoutAlarm(QuicConnection* connection); | 99 static QuicAlarm* GetTimeoutAlarm(QuicConnection* connection); |
97 | 100 |
98 private: | 101 private: |
99 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); | 102 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); |
100 }; | 103 }; |
101 | 104 |
102 } // namespace test | 105 } // namespace test |
103 } // namespace net | 106 } // namespace net |
104 | 107 |
105 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PEER_H_ | 108 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PEER_H_ |
OLD | NEW |