RT..
求教

解决方案 »

  1.   

    导入命名空间:using   System.Net.Sockets;   
      ****************************************************************   
      try   
      {   
      TcpClient   client   =   new   TcpClient("172.16.0.178",   1480);   
      NetworkStream   ns   =   client.GetStream();   
      Label1.Text="CS服务器开放!";   
      }   
      catch   
      {   
      Label1.Text="服务器关闭!";   
      } 
      

  2.   

    这个只能判断TCP的吧?而我要判断的是UDP的……