spell 'acked' consistently
Only use upper-case "ACK" to refer to the frames.
diff --git a/src/lib.rs b/src/lib.rs
index b1fb7ed..b4da027 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -578,7 +578,7 @@
/// A bidirectional stream is considered completed when all incoming data
/// has been read by the application (up to the `fin` offset) or the
/// stream's read direction has been shutdown, and all outgoing data has
- /// been ACKed by the peer (up to the `fin` offset) or the stream's write
+ /// been acked by the peer (up to the `fin` offset) or the stream's write
/// direction has been shutdown.
///
/// The default value is `0`.
@@ -736,7 +736,7 @@
/// Whether the connection handshake has been confirmed.
handshake_confirmed: bool,
- /// Whether an ACK-eliciting packet has been sent since last receiving a
+ /// Whether an ack-eliciting packet has been sent since last receiving a
/// packet.
ack_eliciting_sent: bool,
@@ -1383,13 +1383,13 @@
self.process_frame(frame, epoch, now)?;
}
- // Process ACK'd frames.
+ // Process acked frames.
for acked in self.recovery.acked[epoch].drain(..) {
match acked {
frame::Frame::ACK { ranges, .. } => {
// Stop acknowledging packets less than or equal to the
// largest acknowledged in the sent ACK frame that, in
- // turn, got ACK'd.
+ // turn, got acked.
if let Some(largest_acked) = ranges.largest() {
self.pkt_num_spaces[epoch]
.recv_pkt_need_ack
@@ -1424,7 +1424,7 @@
}
// We only record the time of arrival of the largest packet number
- // that still needs to be ACK'd, to be used for ACK delay calculation.
+ // that still needs to be acked, to be used for ACK delay calculation.
if self.pkt_num_spaces[epoch].recv_pkt_need_ack.largest() < Some(pn) {
self.pkt_num_spaces[epoch].largest_rx_pkt_time = now;
}
@@ -1991,7 +1991,7 @@
self.max_send_bytes = self.max_send_bytes.saturating_sub(written);
- // (Re)start the idle timer if we are sending the first ACK-eliciting
+ // (Re)start the idle timer if we are sending the first ack-eliciting
// packet since last receiving a packet.
if ack_eliciting &&
!self.ack_eliciting_sent &&
@@ -2143,7 +2143,7 @@
/// When the `direction` argument is set to [`Shutdown::Read`], outstanding
/// data in the stream's receive buffer is dropped, and no additional data
/// is added to it. Data received after calling this method is still
- /// validated and ACKed but not stored, and [`stream_recv()`] will not
+ /// validated and acked but not stored, and [`stream_recv()`] will not
/// return it to the application.
///
/// When the `direction` argument is set to [`Shutdown::Write`], outstanding
@@ -3565,7 +3565,7 @@
assert!(pipe.server.handshake_completed);
assert!(!pipe.server.handshake_confirmed);
- // Client ACKs 1-RTT packet.
+ // Client acks 1-RTT packet.
len = testing::recv_send(&mut pipe.client, &mut buf, len).unwrap();
assert!(pipe.client.handshake_completed);
@@ -3583,12 +3583,12 @@
assert!(pipe.server.handshake_completed);
assert!(pipe.server.handshake_confirmed);
- // Client sends 1-RTT ACK-eliciting packet.
+ // Client sends 1-RTT ack-eliciting packet.
assert_eq!(pipe.client.stream_send(0, b"a", false), Ok(1));
len = testing::recv_send(&mut pipe.client, &mut buf, len).unwrap();
- // Server ACKs 1-RTT packet.
+ // Server acks 1-RTT packet.
len = testing::recv_send(&mut pipe.server, &mut buf, len).unwrap();
assert!(pipe.client.handshake_completed);
diff --git a/src/recovery.rs b/src/recovery.rs
index d7016fa..45e5222 100644
--- a/src/recovery.rs
+++ b/src/recovery.rs
@@ -195,7 +195,7 @@
) -> Result<()> {
let largest_acked = ranges.largest().unwrap();
- // If the largest packet number ACKed exceeds any packet number we have
+ // If the largest packet number acked exceeds any packet number we have
// sent, then the ACK is obviously invalid, so there's no need to
// continue further.
if largest_acked > self.largest_sent_pkt[epoch] {
@@ -229,7 +229,7 @@
let mut has_newly_acked = false;
- // Processing ACKed packets in reverse order (from largest to smallest)
+ // Processing acked packets in reverse order (from largest to smallest)
// appears to be faster, possibly due to the BTreeMap implementation.
for pn in ranges.flatten().rev() {
let newly_acked = self.on_packet_acked(pn, epoch);
diff --git a/src/stream.rs b/src/stream.rs
index 9299622..d5ec17d 100644
--- a/src/stream.rs
+++ b/src/stream.rs
@@ -412,7 +412,7 @@
///
/// For bidirectional streams this happens when both the receive and send
/// sides are complete. That is when all incoming data has been read by the
- /// application, and when all outgoing data has been ACKed by the peer.
+ /// application, and when all outgoing data has been acked by the peer.
///
/// For unidirectional streams this happens when either the receive or send
/// side is complete, depending on whether the stream was created locally
@@ -768,7 +768,7 @@
/// Whether the stream's send-side has been shut down.
shutdown: bool,
- /// Ranges of data offsets that have been ACKed.
+ /// Ranges of data offsets that have been acked.
acked: ranges::RangeSet,
}
@@ -853,7 +853,7 @@
self.fin_off = Some(buf.max_off());
}
- // Don't queue data that was already fully ACK'd.
+ // Don't queue data that was already fully acked.
if self.ack_off() >= buf.max_off() {
return Ok(());
}
@@ -928,7 +928,7 @@
self.max_data = cmp::max(self.max_data, max_data);
}
- /// Increments the ACK'd data offset.
+ /// Increments the acked data offset.
pub fn ack(&mut self, off: u64, len: usize) {
self.acked.insert(off..off + len as u64);
}
@@ -961,7 +961,7 @@
/// Returns true if the send-side of the stream is complete.
///
/// This happens when the stream's send final size is known, and the peer
- /// has already ACKed all stream data up to that point.
+ /// has already acked all stream data up to that point.
pub fn is_complete(&self) -> bool {
if let Some(fin_off) = self.fin_off {
if self.acked == (0..fin_off) {
@@ -986,7 +986,7 @@
}
}
- /// Returns the highest contiguously ACKed offset.
+ /// Returns the highest contiguously acked offset.
fn ack_off(&self) -> u64 {
match self.acked.iter().next() {
// Only consider the initial range if it contiguously covers the