OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ | 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ |
6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ | 6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 PacketDroppingTestWriter(); | 38 PacketDroppingTestWriter(); |
39 | 39 |
40 ~PacketDroppingTestWriter() override; | 40 ~PacketDroppingTestWriter() override; |
41 | 41 |
42 // Must be called before blocking, reordering or delaying (loss is OK). May be | 42 // Must be called before blocking, reordering or delaying (loss is OK). May be |
43 // called after connecting if the helper is not available before. | 43 // called after connecting if the helper is not available before. |
44 // |on_can_write| will be triggered when fake-unblocking; ownership will be | 44 // |on_can_write| will be triggered when fake-unblocking; ownership will be |
45 // assumed. | 45 // assumed. |
46 void Initialize(QuicConnectionHelperInterface* helper, | 46 void Initialize(QuicConnectionHelperInterface* helper, |
| 47 QuicAlarmFactory* alarm_factory, |
47 Delegate* on_can_write); | 48 Delegate* on_can_write); |
48 | 49 |
49 // QuicPacketWriter methods: | 50 // QuicPacketWriter methods: |
50 WriteResult WritePacket(const char* buffer, | 51 WriteResult WritePacket(const char* buffer, |
51 size_t buf_len, | 52 size_t buf_len, |
52 const IPAddress& self_address, | 53 const IPAddress& self_address, |
53 const IPEndPoint& peer_address, | 54 const IPEndPoint& peer_address, |
54 PerPacketOptions* options) override; | 55 PerPacketOptions* options) override; |
55 | 56 |
56 bool IsWriteBlocked() const override; | 57 bool IsWriteBlocked() const override; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 QuicBandwidth fake_bandwidth_; | 171 QuicBandwidth fake_bandwidth_; |
171 QuicByteCount buffer_size_; | 172 QuicByteCount buffer_size_; |
172 | 173 |
173 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter); | 174 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter); |
174 }; | 175 }; |
175 | 176 |
176 } // namespace test | 177 } // namespace test |
177 } // namespace net | 178 } // namespace net |
178 | 179 |
179 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ | 180 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ |
OLD | NEW |