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_QUIC_DEFAULT_PACKET_WRITER_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ |
6 #define NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_DEFAULT_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/base/net_export.h" | |
12 #include "net/quic/core/quic_packet_writer.h" | 11 #include "net/quic/core/quic_packet_writer.h" |
| 12 #include "net/quic/platform/api/quic_export.h" |
13 #include "net/quic/platform/api/quic_socket_address.h" | 13 #include "net/quic/platform/api/quic_socket_address.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 struct WriteResult; | 17 struct WriteResult; |
18 | 18 |
19 | 19 |
20 // Default packet writer which wraps QuicSocketUtils WritePacket. | 20 // Default packet writer which wraps QuicSocketUtils WritePacket. |
21 class NET_EXPORT_PRIVATE QuicDefaultPacketWriter : public QuicPacketWriter { | 21 class QUIC_EXPORT_PRIVATE QuicDefaultPacketWriter : public QuicPacketWriter { |
22 public: | 22 public: |
23 explicit QuicDefaultPacketWriter(int fd); | 23 explicit QuicDefaultPacketWriter(int fd); |
24 ~QuicDefaultPacketWriter() override; | 24 ~QuicDefaultPacketWriter() override; |
25 | 25 |
26 // QuicPacketWriter | 26 // QuicPacketWriter |
27 WriteResult WritePacket(const char* buffer, | 27 WriteResult WritePacket(const char* buffer, |
28 size_t buf_len, | 28 size_t buf_len, |
29 const QuicIpAddress& self_address, | 29 const QuicIpAddress& self_address, |
30 const QuicSocketAddress& peer_address, | 30 const QuicSocketAddress& peer_address, |
31 PerPacketOptions* options) override; | 31 PerPacketOptions* options) override; |
(...skipping 12 matching lines...) Expand all Loading... |
44 private: | 44 private: |
45 int fd_; | 45 int fd_; |
46 bool write_blocked_; | 46 bool write_blocked_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); | 48 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace net | 51 } // namespace net |
52 | 52 |
53 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ | 53 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ |
OLD | NEW |