add timeout setter for tcp

This commit is contained in:
2026-01-28 14:04:18 +01:00
parent a1a64aadab
commit 1441bf9a1b
+5
View File
@@ -35,6 +35,11 @@ impl PacketTransportTcpWithCobs {
})
}
/// Calls [std::net::TcpStream::set_read_timeout].
pub fn set_read_timeout(&mut self, duration: Option<Duration>) -> std::io::Result<()> {
self.tcp_stream.set_read_timeout(duration)
}
/// Send a packet.
///
/// It encodes the packet using COBS encoding before sending it over the TCP stream.