File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,9 @@ where
128128 forward ! { connect( socket: & mut Self :: TcpSocket , address: SocketAddr ) -> Result <( ) , nb:: Error <<T as TcpClientStack >:: Error >>}
129129 forward ! { send( socket: & mut Self :: TcpSocket , data: & [ u8 ] ) -> Result <usize , nb:: Error <<T as TcpClientStack >:: Error >>}
130130 forward ! { receive( socket: & mut Self :: TcpSocket , data: & mut [ u8 ] ) -> Result <usize , nb:: Error <<T as TcpClientStack >:: Error >>}
131- forward ! { is_connected( socket: & Self :: TcpSocket ) -> Result <bool , Self :: Error >}
131+ forward ! { is_open( socket: & Self :: TcpSocket ) -> Result <bool , Self :: Error >}
132+ forward ! { may_send( socket: & Self :: TcpSocket ) -> Result <bool , Self :: Error >}
133+ forward ! { may_receive( socket: & Self :: TcpSocket ) -> Result <bool , Self :: Error >}
132134 forward ! { close( socket: Self :: TcpSocket ) -> Result <( ) , Self :: Error >}
133135}
134136
Original file line number Diff line number Diff line change @@ -111,8 +111,16 @@ impl<T: TcpClientStack> TcpClientStack for &mut T {
111111 T :: connect ( self , socket, remote)
112112 }
113113
114- fn is_connected ( & mut self , socket : & Self :: TcpSocket ) -> Result < bool , Self :: Error > {
115- T :: is_connected ( self , socket)
114+ fn is_open ( & mut self , socket : & Self :: TcpSocket ) -> Result < bool , Self :: Error > {
115+ T :: is_open ( self , socket)
116+ }
117+
118+ fn may_send ( & mut self , socket : & Self :: TcpSocket ) -> Result < bool , Self :: Error > {
119+ T :: may_send ( self , socket)
120+ }
121+
122+ fn may_receive ( & mut self , socket : & Self :: TcpSocket ) -> Result < bool , Self :: Error > {
123+ T :: may_receive ( self , socket)
116124 }
117125
118126 fn send (
You can’t perform that action at this time.
0 commit comments