| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
| 10 #include "net/quic/quic_packet_writer.h" | 10 #include "net/quic/quic_packet_writer.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 class QuicBlockedWriterInterface; | 14 class QuicBlockedWriterInterface; |
| 15 struct WriteResult; | 15 struct WriteResult; |
| 16 | 16 |
| 17 namespace tools { | 17 namespace tools { |
| 18 | 18 |
| 19 // Default packet writer which wraps QuicSocketUtils WritePacket. | 19 // Default packet writer which wraps QuicSocketUtils WritePacket. |
| 20 class QuicDefaultPacketWriter : public QuicPacketWriter { | 20 class QuicDefaultPacketWriter : public QuicPacketWriter { |
| 21 public: | 21 public: |
| 22 explicit QuicDefaultPacketWriter(int fd); | 22 explicit QuicDefaultPacketWriter(int fd); |
| 23 virtual ~QuicDefaultPacketWriter(); | 23 virtual ~QuicDefaultPacketWriter() OVERRIDE; |
| 24 | 24 |
| 25 // QuicPacketWriter | 25 // QuicPacketWriter |
| 26 virtual WriteResult WritePacket( | 26 virtual WriteResult WritePacket( |
| 27 const char* buffer, size_t buf_len, | 27 const char* buffer, size_t buf_len, |
| 28 const net::IPAddressNumber& self_address, | 28 const net::IPAddressNumber& self_address, |
| 29 const net::IPEndPoint& peer_address, | 29 const net::IPEndPoint& peer_address, |
| 30 QuicBlockedWriterInterface* blocked_writer) OVERRIDE; | 30 QuicBlockedWriterInterface* blocked_writer) OVERRIDE; |
| 31 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; | 31 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 int fd_; | 34 int fd_; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace tools | 37 } // namespace tools |
| 38 } // namespace net | 38 } // namespace net |
| 39 | 39 |
| 40 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ | 40 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ |
| OLD | NEW |