OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "net/tools/quic/quic_per_connection_packet_writer.h" | 5 #include "net/tools/quic/quic_per_connection_packet_writer.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 | 9 |
10 QuicPerConnectionPacketWriter::QuicPerConnectionPacketWriter( | 10 QuicPerConnectionPacketWriter::QuicPerConnectionPacketWriter( |
11 QuicPacketWriter* shared_writer) | 11 QuicPacketWriter* shared_writer) |
12 : shared_writer_(shared_writer) {} | 12 : shared_writer_(shared_writer) {} |
13 | 13 |
14 QuicPerConnectionPacketWriter::~QuicPerConnectionPacketWriter() {} | 14 QuicPerConnectionPacketWriter::~QuicPerConnectionPacketWriter() {} |
15 | 15 |
16 WriteResult QuicPerConnectionPacketWriter::WritePacket( | 16 WriteResult QuicPerConnectionPacketWriter::WritePacket( |
17 const char* buffer, | 17 const char* buffer, |
18 size_t buf_len, | 18 size_t buf_len, |
19 const IPAddressNumber& self_address, | 19 const IPAddressNumber& self_address, |
20 const IPEndPoint& peer_address) { | 20 const IPEndPoint& peer_address, |
| 21 PerPacketOptions* options) { |
21 return shared_writer_->WritePacket(buffer, buf_len, self_address, | 22 return shared_writer_->WritePacket(buffer, buf_len, self_address, |
22 peer_address); | 23 peer_address, options); |
23 } | 24 } |
24 | 25 |
25 bool QuicPerConnectionPacketWriter::IsWriteBlockedDataBuffered() const { | 26 bool QuicPerConnectionPacketWriter::IsWriteBlockedDataBuffered() const { |
26 return shared_writer_->IsWriteBlockedDataBuffered(); | 27 return shared_writer_->IsWriteBlockedDataBuffered(); |
27 } | 28 } |
28 | 29 |
29 bool QuicPerConnectionPacketWriter::IsWriteBlocked() const { | 30 bool QuicPerConnectionPacketWriter::IsWriteBlocked() const { |
30 return shared_writer_->IsWriteBlocked(); | 31 return shared_writer_->IsWriteBlocked(); |
31 } | 32 } |
32 | 33 |
33 void QuicPerConnectionPacketWriter::SetWritable() { | 34 void QuicPerConnectionPacketWriter::SetWritable() { |
34 shared_writer_->SetWritable(); | 35 shared_writer_->SetWritable(); |
35 } | 36 } |
36 | 37 |
37 QuicByteCount QuicPerConnectionPacketWriter::GetMaxPacketSize( | 38 QuicByteCount QuicPerConnectionPacketWriter::GetMaxPacketSize( |
38 const IPEndPoint& peer_address) const { | 39 const IPEndPoint& peer_address) const { |
39 return shared_writer_->GetMaxPacketSize(peer_address); | 40 return shared_writer_->GetMaxPacketSize(peer_address); |
40 } | 41 } |
41 | 42 |
42 | 43 |
43 } // namespace net | 44 } // namespace net |
OLD | NEW |