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

Side by Side Diff: net/quic/quic_packet_creator.h

Issue 304513006: Changes StreamFramePacketOverhead to use offset in determining overhead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Accumulates frames for the next packet until more frames no longer fit or 5 // Accumulates frames for the next packet until more frames no longer fit or
6 // it's time to create a packet from them. Also provides packet creation of 6 // it's time to create a packet from them. Also provides packet creation of
7 // FEC packets based on previously created packets. 7 // FEC packets based on previously created packets.
8 8
9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ 9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_
10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_ 10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void UpdateSequenceNumberLength( 86 void UpdateSequenceNumberLength(
87 QuicPacketSequenceNumber least_packet_awaited_by_peer, 87 QuicPacketSequenceNumber least_packet_awaited_by_peer,
88 QuicByteCount congestion_window); 88 QuicByteCount congestion_window);
89 89
90 // The overhead the framing will add for a packet with one frame. 90 // The overhead the framing will add for a packet with one frame.
91 static size_t StreamFramePacketOverhead( 91 static size_t StreamFramePacketOverhead(
92 QuicVersion version, 92 QuicVersion version,
93 QuicConnectionIdLength connection_id_length, 93 QuicConnectionIdLength connection_id_length,
94 bool include_version, 94 bool include_version,
95 QuicSequenceNumberLength sequence_number_length, 95 QuicSequenceNumberLength sequence_number_length,
96 QuicStreamOffset offset,
96 InFecGroup is_in_fec_group); 97 InFecGroup is_in_fec_group);
97 98
98 bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset) const; 99 bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset) const;
99 100
100 // Converts a raw payload to a frame which fits into the currently open 101 // Converts a raw payload to a frame which fits into the currently open
101 // packet if there is one. Returns the number of bytes consumed from data. 102 // packet if there is one. Returns the number of bytes consumed from data.
102 // If data is empty and fin is true, the expected behavior is to consume the 103 // If data is empty and fin is true, the expected behavior is to consume the
103 // fin but return 0. 104 // fin but return 0.
104 size_t CreateStreamFrame(QuicStreamId id, 105 size_t CreateStreamFrame(QuicStreamId id,
105 const IOVector& data, 106 const IOVector& data,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 mutable size_t packet_size_; 264 mutable size_t packet_size_;
264 QuicFrames queued_frames_; 265 QuicFrames queued_frames_;
265 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; 266 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_;
266 267
267 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); 268 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator);
268 }; 269 };
269 270
270 } // namespace net 271 } // namespace net
271 272
272 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ 273 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698