public CSS_Communications(Control_Main parent) { //Inherits the Control Main Function main_controls = parent; //Sets IP Address string ip = ""; Console.Write("Enter IP (blank for default 192.168.1.101): "); ip = Console.ReadLine(); if (ip == "") { localAddr = IPAddress.Parse("192.168.1.101"); } else { localAddr = IPAddress.Parse(ip); } //create the cssserver side this.CSS_Listener.DoWork += new System.ComponentModel.DoWorkEventHandler(this.CSS_Reader); cssserver = new TcpListener(localAddr, portcss); //Console Output and chatches the validity of the IP Address Console.WriteLine("Waiting for a Connection on IP: " + localAddr.ToString() + " Port: " + portcss.ToString()); try { cssserver.Start(); } catch { Console.WriteLine("Invalid IP"); return; } CSS_Listener.RunWorkerAsync(); }
public FCU_Communications(Control_Main parent) { //Inherits the Control Main Function main_controls = parent; }