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" |
(...skipping 20 matching lines...) Expand all Loading... |
31 PerPacketOptions* options) override; | 31 PerPacketOptions* options) override; |
32 bool IsWriteBlockedDataBuffered() const override; | 32 bool IsWriteBlockedDataBuffered() const override; |
33 bool IsWriteBlocked() const override; | 33 bool IsWriteBlocked() const override; |
34 void SetWritable() override; | 34 void SetWritable() override; |
35 QuicByteCount GetMaxPacketSize( | 35 QuicByteCount GetMaxPacketSize( |
36 const QuicSocketAddress& peer_address) const override; | 36 const QuicSocketAddress& peer_address) const override; |
37 | 37 |
38 void set_fd(int fd) { fd_ = fd; } | 38 void set_fd(int fd) { fd_ = fd; } |
39 | 39 |
40 protected: | 40 protected: |
41 virtual void set_write_blocked(bool is_blocked); | 41 void set_write_blocked(bool is_blocked); |
42 int fd() { return fd_; } | 42 int fd() { return fd_; } |
43 | 43 |
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 |