Skip to content

Commit

Permalink
Fix some packet/datagram confusion in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Nov 4, 2024
1 parent 690f0d9 commit 8e4e762
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions quinn-proto/src/connection/packet_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e4e762

Please sign in to comment.