Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: net/quic/quartc/quartc_packet_writer.h

Issue 2324833004: Define Stable API for WebRTC/Quartc (Closed)
Patch Set: Patch Set 4 : Create QuartcFactory. Made modification on the API. Change the constructor of QuartcS… Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 will
14 // be implemented on WebRTC side.
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.
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 // If this is set to false, then QuicConnection buffers unsent packets.
27 bool IsWriteBlockedDataBuffered() const override;
28 // Whether the underneath |transport_| is blocked. If this returns true,
29 // outgoing QUIC packets are queued by QuicConnection until
30 // Transport::Observer::OnCanWrite() is called.
31 bool IsWriteBlocked() const override;
32 // Maximum size of the QUIC packet which can be written.
33 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override;
34 // This method is not used because the network layer in WebRTC will determine
35 // the write states.
36 void SetWritable() override;
37
38 private:
39 // QuartcPacketWriter will not own the transport.
40 QuartcSessionInterface::Transport* transport_ = nullptr;
41 };
42
43 } // namespace net
44
45 #endif // NET_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698