| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ | 5 #ifndef NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ |
| 6 #define NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ | 6 #define NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ |
| 7 | 7 |
| 8 #include "net/quic/core/quic_types.h" | 8 #include "net/quic/core/quic_types.h" |
| 9 #include "net/quic/platform/api/quic_export.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 | 12 |
| 12 // Flow control updates per-stream and at the connection levoel. | 13 // Flow control updates per-stream and at the connection levoel. |
| 13 // Based on SPDY's WINDOW_UPDATE frame, but uses an absolute byte offset rather | 14 // Based on SPDY's WINDOW_UPDATE frame, but uses an absolute byte offset rather |
| 14 // than a window delta. | 15 // than a window delta. |
| 15 // TODO(rjshade): A possible future optimization is to make stream_id and | 16 // TODO(rjshade): A possible future optimization is to make stream_id and |
| 16 // byte_offset variable length, similar to stream frames. | 17 // byte_offset variable length, similar to stream frames. |
| 17 struct NET_EXPORT_PRIVATE QuicWindowUpdateFrame { | 18 struct QUIC_EXPORT_PRIVATE QuicWindowUpdateFrame { |
| 18 QuicWindowUpdateFrame() {} | 19 QuicWindowUpdateFrame() {} |
| 19 QuicWindowUpdateFrame(QuicStreamId stream_id, QuicStreamOffset byte_offset); | 20 QuicWindowUpdateFrame(QuicStreamId stream_id, QuicStreamOffset byte_offset); |
| 20 | 21 |
| 21 friend NET_EXPORT_PRIVATE std::ostream& operator<<( | 22 friend QUIC_EXPORT_PRIVATE std::ostream& operator<<( |
| 22 std::ostream& os, | 23 std::ostream& os, |
| 23 const QuicWindowUpdateFrame& w); | 24 const QuicWindowUpdateFrame& w); |
| 24 | 25 |
| 25 // The stream this frame applies to. 0 is a special case meaning the overall | 26 // The stream this frame applies to. 0 is a special case meaning the overall |
| 26 // connection rather than a specific stream. | 27 // connection rather than a specific stream. |
| 27 QuicStreamId stream_id; | 28 QuicStreamId stream_id; |
| 28 | 29 |
| 29 // Byte offset in the stream or connection. The receiver of this frame must | 30 // Byte offset in the stream or connection. The receiver of this frame must |
| 30 // not send data which would result in this offset being exceeded. | 31 // not send data which would result in this offset being exceeded. |
| 31 QuicStreamOffset byte_offset; | 32 QuicStreamOffset byte_offset; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace net | 35 } // namespace net |
| 35 | 36 |
| 36 #endif // NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ | 37 #endif // NET_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_ |
| OLD | NEW |