diff options
author | rtenneti <rtenneti@chromium.org> | 2014-08-25 20:43:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 03:45:04 +0000 |
commit | 4b06ae7cc281996b6a6e5989ef70a54ee3b4ed79 (patch) | |
tree | 5c8bb1f75a87850e8cf4ba89874c518fe45d9633 /net/quic/quic_packet_creator.cc | |
parent | 139fb7ad98ee8af20d557ff78e52473ea36f3ab1 (diff) | |
download | chromium_src-4b06ae7cc281996b6a6e5989ef70a54ee3b4ed79.zip chromium_src-4b06ae7cc281996b6a6e5989ef70a54ee3b4ed79.tar.gz chromium_src-4b06ae7cc281996b6a6e5989ef70a54ee3b4ed79.tar.bz2 |
Change the wire format of the ack frame to include a compressed version
of the previous CongestionFeedback Timestamp frame.
Adds QUIC_VERSION_23. Deprecate CongestionFeedbackFrame
1 bytes - num_received_packets
First packet:
1 byte - distance from the largest observed in sequence number space.
4 bytes - mod of microseconds since the connection's creation when the
packet arrived. (1.1hrs in us)
Every other packet:
1 byte - distance from the largest observed in sequence number space.
2 bytes - mod of microseconds since the previous timestamp
Merge internal change: 73740829
The following are chromium specific changes:
+ Changed ACK frame not to send CongestionFeedback frame
+ Added received_packet_times to ACK frame.
+ The timestamp that is sent is relative to creation time, thus passed
MockClock's now() as argument to AckFrame and it is used to pass
QuicFramer's creation time and received_packet_times.
R=cyr@google.com, ianswett@google.com, rch@chromium.org
Review URL: https://codereview.chromium.org/478153003
Cr-Commit-Position: refs/heads/master@{#291830}
Diffstat (limited to 'net/quic/quic_packet_creator.cc')
-rw-r--r-- | net/quic/quic_packet_creator.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc index 1c3a1a8..1ca834e 100644 --- a/net/quic/quic_packet_creator.cc +++ b/net/quic/quic_packet_creator.cc @@ -379,19 +379,20 @@ SerializedPacket QuicPacketCreator::SerializePacket() { size_t max_plaintext_size = framer_->GetMaxPlaintextSize(max_packet_length_); DCHECK_GE(max_plaintext_size, packet_size_); - // ACK Frames will be truncated only if they're the only frame in the packet, - // and if packet_size_ was set to max_plaintext_size. If truncation occurred, - // then GetSerializedFrameLength will have returned all bytes free. - bool possibly_truncated = packet_size_ == max_plaintext_size && - queued_frames_.size() == 1 && - queued_frames_.back().type == ACK_FRAME; + // ACK Frames will be truncated due to length only if they're the only frame + // in the packet, and if packet_size_ was set to max_plaintext_size. If + // truncation due to length occurred, then GetSerializedFrameLength will have + // returned all bytes free. + bool possibly_truncated_by_length = packet_size_ == max_plaintext_size && + queued_frames_.size() == 1 && + queued_frames_.back().type == ACK_FRAME; SerializedPacket serialized = framer_->BuildDataPacket(header, queued_frames_, packet_size_); LOG_IF(DFATAL, !serialized.packet) << "Failed to serialize " << queued_frames_.size() << " frames."; // Because of possible truncation, we can't be confident that our // packet size calculation worked correctly. - if (!possibly_truncated) { + if (!possibly_truncated_by_length) { DCHECK_EQ(packet_size_, serialized.packet->length()); } packet_size_ = 0; |