File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ use crate::protocol::*;
77
88#[ derive( Debug ) ]
99pub struct WitcherConnection {
10- stream : TcpStream
10+ stream : TcpStream ,
11+ pub port : WitcherPort
1112}
1213
1314impl WitcherConnection {
@@ -22,7 +23,8 @@ impl WitcherConnection {
2223 stream. set_read_timeout ( Some ( std:: time:: Duration :: from_millis ( Self :: DEFAULT_READ_TIMEOUT_MILLIS ) ) ) ?;
2324
2425 Ok ( Self {
25- stream
26+ stream,
27+ port
2628 } )
2729 }
2830
@@ -32,15 +34,17 @@ impl WitcherConnection {
3234 stream. set_read_timeout ( Some ( std:: time:: Duration :: from_millis ( Self :: DEFAULT_READ_TIMEOUT_MILLIS ) ) ) ?;
3335
3436 Ok ( Self {
35- stream
37+ stream,
38+ port
3639 } )
3740 }
3841
3942 pub fn try_clone ( & self ) -> anyhow:: Result < Self > {
4043 let cloned_stream = self . stream . try_clone ( ) ?;
4144
4245 Ok ( Self {
43- stream : cloned_stream
46+ stream : cloned_stream,
47+ port : self . port . clone ( )
4448 } )
4549 }
4650
You can’t perform that action at this time.
0 commit comments