[−][src]Type Definition stubborn_io::StubbornTcpStream
type StubbornTcpStream<A> = StubbornIo<TcpStream, A>;
A drop in replacement for tokio's TcpStream, with the distinction that it will automatically attempt to reconnect in the face of connectivity failures.
use stubborn_io::StubbornTcpStream; let addr = "localhost:8080"; async { let tcp_stream = StubbornTcpStream::connect(addr).await.unwrap(); let regular_tokio_tcp_function_result = tcp_stream.peer_addr(); };