Fix some packet/datagram confusion in comments

This commit is contained in:
Benjamin Saunders
2024-11-04 08:30:19 -08:00
parent 690f0d9d49
commit 8e4e7620d4
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -705,7 +705,7 @@ impl Connection {
break;
}
// Pad the current packet to GSO segment size so it can be included in the
// Pad the current datagram to GSO segment size so it can be included in the
// GSO batch.
builder.pad_to(segment_size as u16);
}
+2 -2
View File
@@ -173,8 +173,8 @@ impl PacketBuilder {
})
}
/// Append the minimum amount of padding such that, after encryption, the packet will occupy at
/// least `min_size` bytes
/// Append the minimum amount of padding to the packet such that, after encryption, the
/// enclosing datagram will occupy at least `min_size` bytes
pub(super) fn pad_to(&mut self, min_size: u16) {
let prev = self.min_size;
self.min_size = self.datagram_start + (min_size as usize) - self.tag_len;