Beispiel #1
0
 /// <summary>
 /// Inicializa las propiedades de la clase
 /// </summary>
 private void init()
 {
     //inicializa las listas
     udpMessageQueue = new NetMessageQueue();
     tcpMessageQueue = new NetMessageQueue();
     tcpServerList   = new RemoteMachineList();
     //inicializa los objetos para TCP
     tcpAddress             = netData.IpTcpListener;
     tcpListener            = new TcpListener(tcpAddress, netData.TcpPort);
     tcpListenerThread      = new Thread(new ThreadStart(listenTCPClients));
     tcpListenerThread.Name = "TCP NetHandler Main Thread";
     //inicializa los objetos UDP
     udpClient            = new UdpClient();
     udpMulticastAdress   = IPAddress.Parse(netData.IpUdpMulticast);
     udpClientThread      = new Thread(new ThreadStart(listenUDPMessages));
     udpClientThread.Name = "UDP NetHandler Main Thread";
     //estado
     netHandlerState = NetHandlerState.INITIATED;
     wifiHandler     = new WifiHandler(netData, wifiInformation);
     startThread     = new Thread(new ThreadStart(start));
     stopPoint       = 0;
     ipHandler       = new IpHandler(netData, resetIp);
     resetThread     = new Thread(new ThreadStart(reset));
 }
 /// <summary>
 /// Inicializa las propiedades de la clase
 /// </summary>
 private void init()
 {
     //inicializa las listas
     udpMessageQueue = new NetMessageQueue();
     tcpMessageQueue = new NetMessageQueue();
     tcpServerList = new RemoteMachineList();
     oldServerList = new RemoteMachineList();
     //inicializa los objetos para TCP
     tcpAddress = netData.IpTcpListener;
     tcpListener = new TcpListener(tcpAddress, netData.TcpPort);
     tcpListenerThread = new Thread(new ThreadStart(listenTCPClients));
     //inicializa los objetos UDP
     udpClient = new UdpClient();
     udpMulticastAdress = IPAddress.Parse(netData.IpUdpMulticast);
     udpClientThread = new Thread(new ThreadStart(listenUDPMessages));
     //estado
     netHandlerState = NetHandlerState.INITIATED;
     wifiHandler = new WifiHandler(netData, wifiInformation);
     startThread = new Thread(new ThreadStart(start));
     stopPoint = 0;
     ipHandler = new IpHandler(netData, resetIp);
     resetThread = new Thread(new ThreadStart(reset));
 }