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

Unified Diff: net/quic/core/quic_stream_frame_data_producer.h

Issue 2963763003: In QUIC, send data is copied to streams rather than frames. Protected by FLAGS_quic_reloadable_flag… (Closed)
Patch Set: Rebase Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_stream.cc ('k') | net/quic/core/quic_stream_send_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream_frame_data_producer.h
diff --git a/net/quic/core/quic_stream_frame_data_producer.h b/net/quic/core/quic_stream_frame_data_producer.h
new file mode 100644
index 0000000000000000000000000000000000000000..abe8af1fb672068b80dd2e1c157b35fbc4057c78
--- /dev/null
+++ b/net/quic/core/quic_stream_frame_data_producer.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_QUIC_CORE_QUIC_STREAM_FRAME_DATA_PRODUCER_H_
+#define NET_QUIC_CORE_QUIC_STREAM_FRAME_DATA_PRODUCER_H_
+
+#include "net/quic/core/quic_iovector.h"
+#include "net/quic/core/quic_types.h"
+
+namespace net {
+
+class QuicDataWriter;
+
+// Pure virtual class to save and retrieve stream data.
+class QUIC_EXPORT_PRIVATE QuicStreamFrameDataProducer {
+ public:
+ virtual ~QuicStreamFrameDataProducer() {}
+
+ // Save |data_length| data starts at |iov_offset| in |iov|.
+ virtual void SaveStreamData(QuicStreamId id,
+ QuicIOVector iov,
+ size_t iov_offset,
+ QuicStreamOffset offset,
+ QuicByteCount data_length) = 0;
+
+ // Let |writer| write |data_length| data with |offset| of stream |id|. Returns
+ // false when the writing fails either because stream is closed or
+ // corresponding data is failed to be retrieved. This method allows writing a
+ // single stream frame from data that spans multiple buffers.
+ virtual bool WriteStreamData(QuicStreamId id,
+ QuicStreamOffset offset,
+ QuicByteCount data_length,
+ QuicDataWriter* writer) = 0;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_CORE_QUIC_STREAM_FRAME_DATA_PRODUCER_H_
« no previous file with comments | « net/quic/core/quic_stream.cc ('k') | net/quic/core/quic_stream_send_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698