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

Unified Diff: net/quic/core/frames/quic_window_update_frame.h

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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/frames/quic_stream_frame.cc ('k') | net/quic/core/frames/quic_window_update_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/frames/quic_window_update_frame.h
diff --git a/net/quic/core/frames/quic_window_update_frame.h b/net/quic/core/frames/quic_window_update_frame.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa9b9467142d136528dfca8c974e55f33640f5aa
--- /dev/null
+++ b/net/quic/core/frames/quic_window_update_frame.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2016 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_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_
+#define NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_
+
+#include "net/quic/core/quic_types.h"
+
+namespace net {
+
+// Flow control updates per-stream and at the connection levoel.
+// Based on SPDY's WINDOW_UPDATE frame, but uses an absolute byte offset rather
+// than a window delta.
+// TODO(rjshade): A possible future optimization is to make stream_id and
+// byte_offset variable length, similar to stream frames.
+struct NET_EXPORT_PRIVATE QuicWindowUpdateFrame {
+ QuicWindowUpdateFrame() {}
+ QuicWindowUpdateFrame(QuicStreamId stream_id, QuicStreamOffset byte_offset);
+
+ friend NET_EXPORT_PRIVATE std::ostream& operator<<(
+ std::ostream& os,
+ const QuicWindowUpdateFrame& w);
+
+ // The stream this frame applies to. 0 is a special case meaning the overall
+ // connection rather than a specific stream.
+ QuicStreamId stream_id;
+
+ // Byte offset in the stream or connection. The receiver of this frame must
+ // not send data which would result in this offset being exceeded.
+ QuicStreamOffset byte_offset;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_
« no previous file with comments | « net/quic/core/frames/quic_stream_frame.cc ('k') | net/quic/core/frames/quic_window_update_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698