Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Side by Side Diff: net/tools/quic/test_tools/limited_mtu_test_writer.h

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/stateless_rejector.h ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_LIMITED_MTU_TEST_WRITER_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "net/quic/core/quic_protocol.h" 11 #include "net/quic/core/quic_packets.h"
12 #include "net/tools/quic/quic_packet_writer_wrapper.h" 12 #include "net/tools/quic/quic_packet_writer_wrapper.h"
13 13
14 namespace net { 14 namespace net {
15 namespace test { 15 namespace test {
16 16
17 // Simulates a connection over a link with fixed MTU. Drops packets which 17 // Simulates a connection over a link with fixed MTU. Drops packets which
18 // exceed the MTU and passes the rest of them as-is. 18 // exceed the MTU and passes the rest of them as-is.
19 class LimitedMtuTestWriter : public QuicPacketWriterWrapper { 19 class LimitedMtuTestWriter : public QuicPacketWriterWrapper {
20 public: 20 public:
21 explicit LimitedMtuTestWriter(QuicByteCount mtu); 21 explicit LimitedMtuTestWriter(QuicByteCount mtu);
22 ~LimitedMtuTestWriter() override; 22 ~LimitedMtuTestWriter() override;
23 23
24 // Inherited from QuicPacketWriterWrapper. 24 // Inherited from QuicPacketWriterWrapper.
25 WriteResult WritePacket(const char* buffer, 25 WriteResult WritePacket(const char* buffer,
26 size_t buf_len, 26 size_t buf_len,
27 const QuicIpAddress& self_address, 27 const QuicIpAddress& self_address,
28 const QuicSocketAddress& peer_address, 28 const QuicSocketAddress& peer_address,
29 PerPacketOptions* options) override; 29 PerPacketOptions* options) override;
30 30
31 private: 31 private:
32 QuicByteCount mtu_; 32 QuicByteCount mtu_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(LimitedMtuTestWriter); 34 DISALLOW_COPY_AND_ASSIGN(LimitedMtuTestWriter);
35 }; 35 };
36 36
37 } // namespace test 37 } // namespace test
38 } // namespace net 38 } // namespace net
39 39
40 #endif // NET_TOOLS_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_ 40 #endif // NET_TOOLS_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/stateless_rejector.h ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698