Skip to content

Commit b3c843f

Browse files
did it again but differently
1 parent 8201276 commit b3c843f

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

System Libs/netlib/Program.cs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff 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
}
159153
}

0 commit comments

Comments
 (0)