OLD | NEW |
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_PACKET_WRITER_WRAPPER_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_WRITER_WRAPPER_H_ |
6 #define NET_TOOLS_QUIC_QUIC_PACKET_WRITER_WRAPPER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_PACKET_WRITER_WRAPPER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 QuicPacketWriterWrapper(); | 22 QuicPacketWriterWrapper(); |
23 explicit QuicPacketWriterWrapper(QuicPacketWriter* writer); | 23 explicit QuicPacketWriterWrapper(QuicPacketWriter* writer); |
24 ~QuicPacketWriterWrapper() override; | 24 ~QuicPacketWriterWrapper() override; |
25 | 25 |
26 // Default implementation of the QuicPacketWriter interface. Passes everything | 26 // Default implementation of the QuicPacketWriter interface. Passes everything |
27 // to |writer_|. | 27 // to |writer_|. |
28 WriteResult WritePacket(const char* buffer, | 28 WriteResult WritePacket(const char* buffer, |
29 size_t buf_len, | 29 size_t buf_len, |
30 const IPAddressNumber& self_address, | 30 const IPAddressNumber& self_address, |
31 const IPEndPoint& peer_address) override; | 31 const IPEndPoint& peer_address, |
| 32 PerPacketOptions* options) override; |
32 bool IsWriteBlockedDataBuffered() const override; | 33 bool IsWriteBlockedDataBuffered() const override; |
33 bool IsWriteBlocked() const override; | 34 bool IsWriteBlocked() const override; |
34 void SetWritable() override; | 35 void SetWritable() override; |
35 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; | 36 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; |
36 | 37 |
37 // Takes ownership of |writer|. | 38 // Takes ownership of |writer|. |
38 void set_writer(QuicPacketWriter* writer); | 39 void set_writer(QuicPacketWriter* writer); |
39 | 40 |
40 private: | 41 private: |
41 scoped_ptr<QuicPacketWriter> writer_; | 42 scoped_ptr<QuicPacketWriter> writer_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(QuicPacketWriterWrapper); | 44 DISALLOW_COPY_AND_ASSIGN(QuicPacketWriterWrapper); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace net | 47 } // namespace net |
47 | 48 |
48 #endif // NET_TOOLS_QUIC_QUIC_PACKET_WRITER_WRAPPER_H_ | 49 #endif // NET_TOOLS_QUIC_QUIC_PACKET_WRITER_WRAPPER_H_ |
OLD | NEW |