Пример #1
0
        protected void StatisticsInit(AuthDataAes128 authData)
        {
#if PROTOCOL_STATISTICS
            if (authData.tree == null)
            {
                authData.tree = new Model.MinSearchTree(Server.tcp_mss - tree_offset);
                authData.tree.Init();
            }

            tree = authData.tree.Clone();
#endif
        }
Пример #2
0
        protected void Sync()
        {
#if PROTOCOL_STATISTICS
            if (Server.data != null && Server.data is AuthDataAes128 authData)
            {
                lock (authData)
                {
                    if (authData.tree != null && packet_cnt != null)
                    {
                        authData.tree.Update(packet_cnt);
                        tree = authData.tree.Clone();
                    }
                }
            }
#endif
        }