OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PACKET_WRITER_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_WRITER_H_ |
6 #define NET_TOOLS_QUIC_QUIC_PACKET_WRITER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_PACKET_WRITER_H_ |
7 | 7 |
8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
12 class QuicBlockedWriterInterface; | 12 class QuicBlockedWriterInterface; |
13 | 13 |
| 14 namespace tools { |
| 15 |
14 // An interface between writers and the entity managing the | 16 // An interface between writers and the entity managing the |
15 // socket (in our case the QuicDispatcher). This allows the Dispatcher to | 17 // socket (in our case the QuicDispatcher). This allows the Dispatcher to |
16 // control writes, and manage any writers who end up write blocked. | 18 // control writes, and manage any writers who end up write blocked. |
17 class QuicPacketWriter { | 19 class QuicPacketWriter { |
18 public: | 20 public: |
19 virtual ~QuicPacketWriter() {} | 21 virtual ~QuicPacketWriter() {} |
20 | 22 |
21 virtual int WritePacket(const char* buffer, size_t buf_len, | 23 virtual int WritePacket(const char* buffer, size_t buf_len, |
22 const net::IPAddressNumber& self_address, | 24 const net::IPAddressNumber& self_address, |
23 const net::IPEndPoint& peer_address, | 25 const net::IPEndPoint& peer_address, |
24 QuicBlockedWriterInterface* blocked_writer, | 26 QuicBlockedWriterInterface* blocked_writer, |
25 int* error) = 0; | 27 int* error) = 0; |
26 }; | 28 }; |
27 | 29 |
| 30 } // namespace tools |
28 } // namespace net | 31 } // namespace net |
29 | 32 |
30 #endif // NET_TOOLS_QUIC_QUIC_PACKET_WRITER_H_ | 33 #endif // NET_TOOLS_QUIC_QUIC_PACKET_WRITER_H_ |
OLD | NEW |