From ba252e72da08b40a42991bbf1950a5f4f8a3ba73 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 8 Feb 2021 03:06:51 +0100 Subject: [PATCH] libasync: provide get/set ack_delay (new in smoltcp 0.7.0) --- libasync/src/smoltcp/tcp_stream.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libasync/src/smoltcp/tcp_stream.rs b/libasync/src/smoltcp/tcp_stream.rs index f6846da..9fb6b60 100644 --- a/libasync/src/smoltcp/tcp_stream.rs +++ b/libasync/src/smoltcp/tcp_stream.rs @@ -262,6 +262,14 @@ impl TcpStream { pub fn set_timeout(&mut self, duration: Option) { self.with_socket(|mut socket| socket.set_timeout(duration)); } + + pub fn ack_delay(&self) -> Option { + self.with_socket(|socket| socket.ack_delay()) + } + + pub fn set_ack_delay(&mut self, duration: Option) { + self.with_socket(|mut socket| socket.set_ack_delay(duration)); + } } impl Drop for TcpStream {