Merge pull request #2371 from dzamlo/main
Add set_hop_limit to UDP sockets
This commit is contained in:
commit
a7eb6a44da
1 changed files with 5 additions and 0 deletions
|
@ -222,6 +222,11 @@ impl<'a> UdpSocket<'a> {
|
||||||
pub fn payload_send_capacity(&self) -> usize {
|
pub fn payload_send_capacity(&self) -> usize {
|
||||||
self.with(|s, _| s.payload_send_capacity())
|
self.with(|s, _| s.payload_send_capacity())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set the hop limit field in the IP header of sent packets.
|
||||||
|
pub fn set_hop_limit(&mut self, hop_limit: Option<u8>) {
|
||||||
|
self.with_mut(|s, _| s.set_hop_limit(hop_limit))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for UdpSocket<'_> {
|
impl Drop for UdpSocket<'_> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue