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
128
128
forward ! { connect( socket: & mut Self :: TcpSocket , address: SocketAddr ) -> Result <( ) , nb:: Error <<T as TcpClientStack >:: Error >>}
129
129
forward ! { send( socket: & mut Self :: TcpSocket , data: & [ u8 ] ) -> Result <usize , nb:: Error <<T as TcpClientStack >:: Error >>}
130
130
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 >}
132
134
forward ! { close( socket: Self :: TcpSocket ) -> Result <( ) , Self :: Error >}
133
135
}
134
136
Original file line number Diff line number Diff line change @@ -111,8 +111,16 @@ impl<T: TcpClientStack> TcpClientStack for &mut T {
111
111
T :: connect ( self , socket, remote)
112
112
}
113
113
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)
116
124
}
117
125
118
126
fn send (
You can’t perform that action at this time.
0 commit comments