示例#1
0
文件: TCPManager.cs 项目: karlnet/mpb
        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());

        }
示例#2
0
 public MPBProtocol(MPBManager theMPBManager)
 {
     mpbManager = theMPBManager;
 }
示例#3
0
文件: Form1.cs 项目: karlnet/mpb
        /// ///////////////////////////////////////////////////////////////////////////////////
        private void Form1_Load(object sender, EventArgs e)
        {
            DisControls(null,true);

            mpbManager = new MPBManager(this);
            tcpManager = new TCPManager(mpbManager);

            c = new Camera(serialPort1);
        }