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_packet_writer_wrapper.h" | 5 #include "net/tools/quic/quic_packet_writer_wrapper.h" |
6 | 6 |
7 #include "net/quic/quic_types.h" | 7 #include "net/quic/quic_types.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 QuicPacketWriterWrapper::QuicPacketWriterWrapper() {} | 11 QuicPacketWriterWrapper::QuicPacketWriterWrapper() {} |
12 | 12 |
13 QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer) | 13 QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer) |
14 : writer_(writer) {} | 14 : writer_(writer) {} |
15 | 15 |
16 QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {} | 16 QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {} |
17 | 17 |
18 WriteResult QuicPacketWriterWrapper::WritePacket( | 18 WriteResult QuicPacketWriterWrapper::WritePacket( |
19 const char* buffer, | 19 const char* buffer, |
20 size_t buf_len, | 20 size_t buf_len, |
21 const IPAddressNumber& self_address, | 21 const IPAddressNumber& self_address, |
22 const IPEndPoint& peer_address) { | 22 const IPEndPoint& peer_address, |
23 return writer_->WritePacket(buffer, buf_len, self_address, peer_address); | 23 PerPacketOptions* options) { |
| 24 return writer_->WritePacket(buffer, buf_len, self_address, peer_address, |
| 25 options); |
24 } | 26 } |
25 | 27 |
26 bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const { | 28 bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const { |
27 return writer_->IsWriteBlockedDataBuffered(); | 29 return writer_->IsWriteBlockedDataBuffered(); |
28 } | 30 } |
29 | 31 |
30 bool QuicPacketWriterWrapper::IsWriteBlocked() const { | 32 bool QuicPacketWriterWrapper::IsWriteBlocked() const { |
31 return writer_->IsWriteBlocked(); | 33 return writer_->IsWriteBlocked(); |
32 } | 34 } |
33 | 35 |
34 void QuicPacketWriterWrapper::SetWritable() { | 36 void QuicPacketWriterWrapper::SetWritable() { |
35 writer_->SetWritable(); | 37 writer_->SetWritable(); |
36 } | 38 } |
37 | 39 |
38 QuicByteCount QuicPacketWriterWrapper::GetMaxPacketSize( | 40 QuicByteCount QuicPacketWriterWrapper::GetMaxPacketSize( |
39 const IPEndPoint& peer_address) const { | 41 const IPEndPoint& peer_address) const { |
40 return writer_->GetMaxPacketSize(peer_address); | 42 return writer_->GetMaxPacketSize(peer_address); |
41 } | 43 } |
42 | 44 |
43 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) { | 45 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) { |
44 writer_.reset(writer); | 46 writer_.reset(writer); |
45 } | 47 } |
46 | 48 |
47 } // namespace net | 49 } // namespace net |
OLD | NEW |