File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed
Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,6 @@ public class TCPClient
3737 private StreamReader sr ;
3838 private NetworkStream ns ;
3939
40- public int ReadTimeout
41- {
42- set
43- {
44- ns . ReadTimeout = value ;
45- }
46- }
47-
4840 public TCPClient ( string ip , int port )
4941 {
5042 client = new TcpClient ( ip , port ) ;
@@ -83,6 +75,11 @@ public void Flush()
8375 {
8476 sw . Flush ( ) ;
8577 }
78+
79+ public void setReadTimeout ( int timeout )
80+ {
81+ ns . ReadTimeout = timeout ;
82+ }
8683 }
8784
8885 public class TCPListener
@@ -108,14 +105,6 @@ public class TCPSocket
108105 private StreamReader sr ;
109106 private NetworkStream ns ;
110107
111- public int ReadTimeout
112- {
113- set
114- {
115- ns . ReadTimeout = value ;
116- }
117- }
118-
119108 public TCPSocket ( object internalTCPData )
120109 {
121110 socket = ( Socket ) internalTCPData ;
@@ -154,6 +143,11 @@ public void Flush()
154143 {
155144 sw . Flush ( ) ;
156145 }
146+
147+ public void setReadTimeout ( int timeout )
148+ {
149+ ns . ReadTimeout = timeout ;
150+ }
157151 }
158152 }
159- }
153+ }
You can’t perform that action at this time.
0 commit comments