OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Returns true if an FEC packet is under construction. | 58 // Returns true if an FEC packet is under construction. |
59 bool IsFecGroupOpen() const; | 59 bool IsFecGroupOpen() const; |
60 | 60 |
61 // Makes the framer not serialize the protocol version in sent packets. | 61 // Makes the framer not serialize the protocol version in sent packets. |
62 void StopSendingVersion(); | 62 void StopSendingVersion(); |
63 | 63 |
64 // Update the sequence number length to use in future packets as soon as it | 64 // Update the sequence number length to use in future packets as soon as it |
65 // can be safely changed. | 65 // can be safely changed. |
66 void UpdateSequenceNumberLength( | 66 void UpdateSequenceNumberLength( |
67 QuicPacketSequenceNumber least_packet_awaited_by_peer, | 67 QuicPacketSequenceNumber least_packet_awaited_by_peer, |
68 QuicByteCount congestion_window); | 68 QuicPacketCount max_packets_in_flight); |
69 | 69 |
70 // The overhead the framing will add for a packet with one frame. | 70 // The overhead the framing will add for a packet with one frame. |
71 static size_t StreamFramePacketOverhead( | 71 static size_t StreamFramePacketOverhead( |
72 QuicConnectionIdLength connection_id_length, | 72 QuicConnectionIdLength connection_id_length, |
73 bool include_version, | 73 bool include_version, |
74 QuicSequenceNumberLength sequence_number_length, | 74 QuicSequenceNumberLength sequence_number_length, |
75 QuicStreamOffset offset, | 75 QuicStreamOffset offset, |
76 InFecGroup is_in_fec_group); | 76 InFecGroup is_in_fec_group); |
77 | 77 |
78 bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset) const; | 78 bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset) const; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 mutable size_t packet_size_; | 291 mutable size_t packet_size_; |
292 QuicFrames queued_frames_; | 292 QuicFrames queued_frames_; |
293 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; | 293 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; |
294 | 294 |
295 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 295 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
296 }; | 296 }; |
297 | 297 |
298 } // namespace net | 298 } // namespace net |
299 | 299 |
300 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 300 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
OLD | NEW |