public TCPManager(MPBManager theMPBManager) { mpbManager = theMPBManager; protocol = new MPBProtocol(mpbManager); //IPAddress localAddr = IPAddress.Parse("127.0.0.1"); IPHostEntry ipHostEntry = Dns.Resolve(Dns.GetHostName()); IPAddress localAddr = ipHostEntry.AddressList[0]; server = new TcpListener(localAddr, LocalServerPort); server.Start(); Task.Run(() => RemoteMPBProcess()); }
public MPBProtocol(MPBManager theMPBManager) { mpbManager = theMPBManager; }
/// /////////////////////////////////////////////////////////////////////////////////// private void Form1_Load(object sender, EventArgs e) { DisControls(null,true); mpbManager = new MPBManager(this); tcpManager = new TCPManager(mpbManager); c = new Camera(serialPort1); }