日期:2014-05-18  浏览次数:20719 次

[各位 C#通信编程高手请进啊] 求高性能UDP/TCP 通信模块源代码!
求高性能UDP/TCP 通信模块源代码,由于客户端可能是智能设备(PDA等),开发环境降为
VS2003 我个人对通信一知半解,请大家帮帮忙,能给点高性能的代码(耗内存小,通信速度快的最好),或者提供点实质性,建设性的意见·谢谢大家了·万分感谢!!!!!

------解决方案--------------------
这个东西不好找吧!

去 codeproject 网站上面搜搜,兴许还有结果。
------解决方案--------------------
mark
------解决方案--------------------
UDP接收...
C# code
 
public void ReceiveMessage()
    {
    //在本机指定的端口接收
      IPEndPoint remoteIpEndIPoint = new IPEndPoint(IPAddress.Any,1000);
      udpReceive = new UdpClient(remoteIpEndIPoint);
      IPEndPoint iep = new IPEndPoint(IPAddress.Any, 0);
      //接收从远程主机发送过来的信息
      while (true)
      {
      //ref表示引用类型的 IPPoint实例接收消息
        byte[] receiveBytes = udpReceive.Receive(ref iep);
      for (int i = 0; i < receiveBytes.Length; i++)
        {
          RetStr += String.Format("{0:X2} ", receiveBytes[i]);
        }
      MessageBox.Show(RetStr);
      }
    }