Example #1
0
 public void Start()
 {
     Debug.WriteLine("Starting network Service Updater");
     try
     {
         while (Run && Client.Connected)
         {
             var coninfo = new Connection_Listings
             {
                 Name            = System.Environment.MachineName,
                 TCP_Connections = NetUtils.TCP_Table.GetAllConnections(),
                 UDP_Connections = NetUtils.UDP_Table.GetAllConnections()
             };
             Send(coninfo);
             System.Threading.Thread.Sleep(UpdateInterval);
         }
     } catch (Exception e)
     {
         Debug.WriteLine(e.Message);
     }
     if (Client != null)
     {
         Client.Close();
         Client = null;
     }
     Debug.WriteLine("network Service Updater Stopped");
 }
Example #2
0
 public Computer()
 {
     _Connections = new Connection_Listings();
 }