Compare commits

1 Commits

Author SHA1 Message Date
meggert 1441bf9a1b add timeout setter for tcp 2026-01-28 14:04:18 +01:00
+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.