我用C#写了个控件(不是WEB控件),用来接收服务器数据怎么在.net 1.0环境下接收数据很快,为什么在.net 1.1环境下接收数据很慢?请高手指点
/////////////////////////////////
服务器端代码:
System.Net.IPHostEntry IpH=System.Net.Dns.GetHostByName("M-dingqp");
System.Net.IPAddress[] IpA=IpH.AddressList;
Tl=new TcpListener(IpA[0],4000);
Tl.Start();
System.Net.Sockets.TcpClient Tc=Tl.AcceptTcpClient();
textBox1.Text=Tl.LocalEndpoint.ToString();
Tl.Stop();
System.GC.Collect();
////////////////////////////
客户端WEB中的控件代码:
public bool ConnSocket(string IpAdress, int Port)
{
string st1,str2;
System.Net.IPAddress IA=System.Net.IPAddress.Parse(IpAdress);
System.Net.IPEndPoint IEp=new IPEndPoint(IA,Port);
try
{
st1=System.DateTime.Now.ToString();
Tc.Connect(IEp);
str2=System.DateTime.Now.ToString();
textBox2.Text=st1+"()"+str2;
Tc.Close();
return true;
}
catch(Exception ee)
{
textBox2.Text=ee.Message.ToString();
         return false;
}
}
/////////
Tc.Connect(IEp);这段程序,控件在WEB中运行很长时间