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

Side by Side Diff: net/tools/quic/quic_per_connection_packet_writer.h

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 years, 1 month 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/quic_packet_printer_bin.cc ('k') | net/tools/quic/quic_server.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_QUIC_PER_CONNECTION_PACKET_WRITER_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_PER_CONNECTION_PACKET_WRITER_H_
6 #define NET_TOOLS_QUIC_QUIC_PER_CONNECTION_PACKET_WRITER_H_ 6 #define NET_TOOLS_QUIC_QUIC_PER_CONNECTION_PACKET_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_connection.h" 11 #include "net/quic/core/quic_connection.h"
12 #include "net/quic/core/quic_packet_writer.h" 12 #include "net/quic/core/quic_packet_writer.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 // A connection-specific packet writer that wraps a shared writer. 16 // A connection-specific packet writer that wraps a shared writer.
17 class QuicPerConnectionPacketWriter : public QuicPacketWriter { 17 class QuicPerConnectionPacketWriter : public QuicPacketWriter {
18 public: 18 public:
19 // Does not take ownership of |shared_writer|. 19 // Does not take ownership of |shared_writer|.
20 explicit QuicPerConnectionPacketWriter(QuicPacketWriter* shared_writer); 20 explicit QuicPerConnectionPacketWriter(QuicPacketWriter* shared_writer);
21 ~QuicPerConnectionPacketWriter() override; 21 ~QuicPerConnectionPacketWriter() override;
22 22
23 QuicPacketWriter* shared_writer() const { return shared_writer_; }
24
25 // Default implementation of the QuicPacketWriter interface: Passes everything 23 // Default implementation of the QuicPacketWriter interface: Passes everything
26 // to |shared_writer_|. 24 // to |shared_writer_|.
27 WriteResult WritePacket(const char* buffer, 25 WriteResult WritePacket(const char* buffer,
28 size_t buf_len, 26 size_t buf_len,
29 const IPAddress& self_address, 27 const IPAddress& self_address,
30 const IPEndPoint& peer_address, 28 const IPEndPoint& peer_address,
31 PerPacketOptions* options) override; 29 PerPacketOptions* options) override;
32 bool IsWriteBlockedDataBuffered() const override; 30 bool IsWriteBlockedDataBuffered() const override;
33 bool IsWriteBlocked() const override; 31 bool IsWriteBlocked() const override;
34 void SetWritable() override; 32 void SetWritable() override;
35 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; 33 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override;
36 34
37 private: 35 private:
38 QuicPacketWriter* shared_writer_; // Not owned. 36 QuicPacketWriter* shared_writer_; // Not owned.
39 37
40 DISALLOW_COPY_AND_ASSIGN(QuicPerConnectionPacketWriter); 38 DISALLOW_COPY_AND_ASSIGN(QuicPerConnectionPacketWriter);
41 }; 39 };
42 40
43 } // namespace net 41 } // namespace net
44 42
45 #endif // NET_TOOLS_QUIC_QUIC_PER_CONNECTION_PACKET_WRITER_H_ 43 #endif // NET_TOOLS_QUIC_QUIC_PER_CONNECTION_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_packet_printer_bin.cc ('k') | net/tools/quic/quic_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698