public JhTcpServer(int port)
 {
     IPAddress ipAddress = IPAddress.Parse("127.0.0.1"); //Dns.Resolve("localhost").AddressList[0];
     server = new TcpListener(ipAddress, port);
     adm = new CommDataMgr();
     status = new Parm(this);
 }
 /// <summary>
 /// ���췽��
 /// </summary>
 /// <param name="dm">�ⲿֲ������ݹ�����</param>
 /// <param name="ob">�۲���</param>
 /// <param name="tcpClient">ͨ������</param>
 public JhClient(CommDataMgr dm, IObserver ob, TcpClient tcpClient)
 {
     //
     // TODO: �ڴ˴���ӹ��캯���߼�
     //
     status = new Parm(this);
     checkStatus = new Parm(this);
     autoConnectStatus = new Parm(this);
     if (dm == null)
     {
         adm = new CommDataMgr();
     }
     else adm = dm;
     if (ob != null) adm.Add(ob);
     if (tcpClient == null)
     {
         client = new TcpClient();
     }
     else client = tcpClient;
     ID = index++;
     OnClosed += new CommEventHandler(OnConnectClosed);
     Console.WriteLine("JH tcp client {0} constructed", ID);
 }
 /// <summary>
 /// �޲������췽��
 /// </summary>
 public CommDataMgr()
 {
     id = index++;
     dnFlag = new Parm(this);
     Console.WriteLine("JH data distributor {0} constructed", id);
 }