Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ | |
| 6 #define NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ | |
| 7 | |
| 8 #include "net/quic/core/quic_packet_writer.h" | |
| 9 #include "net/quic/quartc/quartc_session_interface.h" | |
| 10 | |
| 11 namespace net { | |
| 12 | |
| 13 // This class writes the packets to network layer with a |transport_| which is | |
| 14 // implemented on WebRTC side. | |
|
pthatcher2
2016/10/05 22:12:06
This might be more clear as "Implements a QuicPack
zhihuang1
2016/10/13 06:22:40
Done.
| |
| 15 class NET_EXPORT_PRIVATE QuartcPacketWriter : public QuicPacketWriter { | |
| 16 public: | |
| 17 QuartcPacketWriter(QuartcSessionInterface::Transport* transport); | |
| 18 ~QuartcPacketWriter() override {} | |
| 19 | |
| 20 // Called from QuicConnection when the session has packets to write. | |
|
pthatcher2
2016/10/05 22:12:06
This would be more clear simply as "The QuicConnec
pthatcher1
2016/10/14 18:58:58
Did you look at this comment?
zhihuang1
2016/10/16 00:45:27
Ah yes, I did and I also made the changes. Sorry f
| |
| 21 WriteResult WritePacket(const char* buffer, | |
| 22 size_t buf_len, | |
| 23 const IPAddress& self_address, | |
| 24 const IPEndPoint& peer_address, | |
| 25 PerPacketOptions* options) override; | |
| 26 | |
| 27 // If this is set to false, then QuicConnection buffers unsent packets. | |
|
pthatcher2
2016/10/05 22:12:06
Please put the implementation here so it's clear i
zhihuang1
2016/10/13 06:22:40
This is not allowed by the Chromium style checker.
| |
| 28 bool IsWriteBlockedDataBuffered() const override; | |
| 29 | |
| 30 // Whether the underneath |transport_| is blocked. If this returns true, | |
| 31 // outgoing QUIC packets are queued by QuicConnection until | |
| 32 // Transport::Observer::OnCanWrite() is called. | |
| 33 bool IsWriteBlocked() const override; | |
| 34 | |
| 35 // Maximum size of the QUIC packet which can be written. | |
| 36 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; | |
|
pthatcher2
2016/10/05 22:12:06
Same here: can you put the implementation here to
zhihuang1
2016/10/13 06:22:40
Same here. This is not allowed because of Chromium
| |
| 37 | |
| 38 // This method is not used because the network layer in WebRTC will determine | |
| 39 // the writing states. | |
| 40 void SetWritable() override; | |
|
pthatcher2
2016/10/05 22:12:06
And here too
| |
| 41 | |
| 42 private: | |
| 43 // QuartcPacketWriter will not own the transport. | |
|
pthatcher2
2016/10/05 22:12:06
What does own the transport?
zhihuang1
2016/10/13 06:22:40
The cricket::QuicTransportChannel will implement t
| |
| 44 QuartcSessionInterface::Transport* transport_ = nullptr; | |
| 45 }; | |
| 46 | |
| 47 } // namespace net | |
| 48 | |
| 49 #endif // NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_ | |
| OLD | NEW |