Пример #1
0
        public void handle(ClientThriftMessage message)
        {
            var seg = message.Text.Split(' ');

            if (seg.Length > 2)
            {
                var succ = seg[2] == Guid;
                if (succ)
                {
                    RecvSuccStatus.TryAdd(Seq, succ);
                }
                else
                {
                    RecvFailStatus.AddOrUpdate(Seq, s => new string[] { message.Text, "" }, (u, old) => new object[] { message, old[1] });
                }
                if (Seq % 3000 == 0)
                {
                    Console.WriteLine($"client recv: {Seq:0000000}: {succ}");
                }
            }
        }
Пример #2
0
        public void handle(CommandLineMessage message)
        {
            var seg = message.Parameters;

            if (seg.Length > 1)
            {
                var succ = seg[1] == Guid;
                if (succ)
                {
                    RecvSuccStatus.TryAdd(Seq, succ);
                }
                else
                {
                    RecvFailStatus.AddOrUpdate(Seq, s => new string[] { message.FullCommandLine, "" }, (u, old) => new object[] { message, old[1] });
                }
                if (Seq % 3000 == 0)
                {
                    Console.WriteLine($"client recv: {Seq:0000000}: {succ}");
                }
            }
        }