| 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual WriteResult WritePacket( | 25 virtual WriteResult WritePacket( |
| 26 const char* buffer, size_t buf_len, | 26 const char* buffer, size_t buf_len, |
| 27 const net::IPAddressNumber& self_address, | 27 const net::IPAddressNumber& self_address, |
| 28 const net::IPEndPoint& peer_address) OVERRIDE; | 28 const net::IPEndPoint& peer_address) OVERRIDE; |
| 29 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; | 29 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; |
| 30 virtual bool IsWriteBlocked() const OVERRIDE; | 30 virtual bool IsWriteBlocked() const OVERRIDE; |
| 31 virtual void SetWritable() OVERRIDE; | 31 virtual void SetWritable() OVERRIDE; |
| 32 | 32 |
| 33 void set_fd(int fd) { fd_ = fd; } | 33 void set_fd(int fd) { fd_ = fd; } |
| 34 | 34 |
| 35 protected: |
| 36 void set_write_blocked(bool is_blocked) { |
| 37 write_blocked_ = is_blocked; |
| 38 } |
| 39 int fd() { return fd_; } |
| 40 |
| 35 private: | 41 private: |
| 36 int fd_; | 42 int fd_; |
| 37 bool write_blocked_; | 43 bool write_blocked_; |
| 38 | 44 |
| 39 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); | 45 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); |
| 40 }; | 46 }; |
| 41 | 47 |
| 42 } // namespace tools | 48 } // namespace tools |
| 43 } // namespace net | 49 } // namespace net |
| 44 | 50 |
| 45 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ | 51 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ |
| OLD | NEW |