libasync: provide get/set ack_delay (new in smoltcp 0.7.0)

This commit is contained in:
Astro 2021-02-08 03:06:51 +01:00
parent a2416f26a0
commit ba252e72da
1 changed files with 8 additions and 0 deletions

View File

@ -262,6 +262,14 @@ impl TcpStream {
pub fn set_timeout(&mut self, duration: Option<Duration>) {
self.with_socket(|mut socket| socket.set_timeout(duration));
}
pub fn ack_delay(&self) -> Option<Duration> {
self.with_socket(|socket| socket.ack_delay())
}
pub fn set_ack_delay(&mut self, duration: Option<Duration>) {
self.with_socket(|mut socket| socket.set_ack_delay(duration));
}
}
impl Drop for TcpStream {