コード例 #1
0
ファイル: ChannelSpeedTest.cs プロジェクト: wikancz/BTDB
            public void Run()
            {
                _twoChannels = new PipedTwoChannels();
                _twoChannels.Second.OnReceive.Subscribe(_twoChannels.Second.Send);
                const int messageLen = 1024;
                var       sender     = new Sender(messageLen, MessageCount, _twoChannels.First);
                var       receiver   = new Receiver(messageLen, MessageCount);

                receiver.StartReceive(_twoChannels.First);
                sender.MassSend();
                receiver.WaitTillFinish();
                Console.WriteLine(sender.SummaryInfo("PipeEcho send"));
                Console.WriteLine(receiver.SummaryInfo("PipeEcho recv"));
                _twoChannels.Disconnect();
            }
コード例 #2
0
 void Disconnect()
 {
     _pipedTwoChannels.Disconnect();
 }