예제 #1
0
        public void Start()
        {
            cts = new CancellationTokenSource();

            emu = new WFQYDBemul(StreamSourceCfg.Get(), Id, cts.Token);
            emu.Start();
        }
예제 #2
0
파일: TcpEmu.cs 프로젝트: windygu/WFQYDB
        private void Ts_OnClientConnected(object sender, TcpServerStreamSource e)
        {
            var emu = new WFQYDBemul(e, new byte[] { 1, 2, 3, 4 }, cts.Token);

            emu.Start();
            wFQYDBemuls.Add(emu);
            emu.Dead += (sender, args) => wFQYDBemuls.Remove((WFQYDBemul)sender);
        }