| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_QUARTC_QUARTC_PACKET_WRITER_H_ | 5 #ifndef NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ |
| 6 #define NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ | 6 #define NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ |
| 7 | 7 |
| 8 #include "net/base/net_export.h" | |
| 9 #include "net/quic/core/quic_packet_writer.h" | 8 #include "net/quic/core/quic_packet_writer.h" |
| 9 #include "net/quic/platform/api/quic_export.h" |
| 10 #include "net/quic/quartc/quartc_session_interface.h" | 10 #include "net/quic/quartc/quartc_session_interface.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 // Implements a QuicPacketWriter using a | 14 // Implements a QuicPacketWriter using a |
| 15 // QuartcSessionInterface::PacketTransport, which allows a QuicConnection to | 15 // QuartcSessionInterface::PacketTransport, which allows a QuicConnection to |
| 16 // use(for example), a WebRTC IceTransport. | 16 // use(for example), a WebRTC IceTransport. |
| 17 class NET_EXPORT_PRIVATE QuartcPacketWriter : public QuicPacketWriter { | 17 class QUIC_EXPORT_PRIVATE QuartcPacketWriter : public QuicPacketWriter { |
| 18 public: | 18 public: |
| 19 QuartcPacketWriter(QuartcSessionInterface::PacketTransport* packet_transport, | 19 QuartcPacketWriter(QuartcSessionInterface::PacketTransport* packet_transport, |
| 20 QuicByteCount max_packet_size); | 20 QuicByteCount max_packet_size); |
| 21 ~QuartcPacketWriter() override {} | 21 ~QuartcPacketWriter() override {} |
| 22 | 22 |
| 23 // The QuicConnection calls WritePacket and the QuicPacketWriter writes them | 23 // The QuicConnection calls WritePacket and the QuicPacketWriter writes them |
| 24 // to the QuartcSessionInterface::PacketTransport. | 24 // to the QuartcSessionInterface::PacketTransport. |
| 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, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 private: | 49 private: |
| 50 // QuartcPacketWriter will not own the transport. | 50 // QuartcPacketWriter will not own the transport. |
| 51 QuartcSessionInterface::PacketTransport* packet_transport_; | 51 QuartcSessionInterface::PacketTransport* packet_transport_; |
| 52 // The maximum size of the packet can be written by this writer. | 52 // The maximum size of the packet can be written by this writer. |
| 53 QuicByteCount max_packet_size_; | 53 QuicByteCount max_packet_size_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace net | 56 } // namespace net |
| 57 | 57 |
| 58 #endif // NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ | 58 #endif // NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ |
| OLD | NEW |