是否可以同时读取多个(2个TCP端口)?如何同时读取多个TCP(端口)?
实施例:
public void getFeed()
{
while(true)
{
try
{
if (!isReadableStream()) throw new Exception("not readable Stream");
recieveMsg = streamReader.ReadLine();
if(!String.IsNullOrEmpty(recieveMsg))
{
displayConsole(recieveMsg, false);
}
}
catch(Exception ex)
{
displayError(ex.Message);
}
}
}
函数上述读取1个端口,我想读取另一个端口,因为服务器越来越饲料从另一个服务器每1-2秒。
不要在不同的线程 – zellio
@Mimisbrunnr你能举个例子,以使其更容易理解完全一样的东西?谢谢! – Racooon