Пример #1
0
        protected object[] GetDetailsValues(string key)
        {
            ArrayList ret = new ArrayList();

            byte[] pm = new byte[0];
            do
            {
                object[] get = GetDetails(key, Maxvals, pm);

                pm  = (byte[])get[1];
                get = (object[])get[0];
                foreach (object[] obj in get)
                {
                    OpenDHTMessageDetails details = new OpenDHTMessageDetails();
                    details.Data = (byte[])obj[0];
                    details.TTL  = (int)obj[1];
                    details.Algo = (string)obj[2];
                    details.Hash = (byte[])obj[3];
                    object val = GetValue(details.Data);
                    if (val != null)
                    {
                        ret.Add(details);
                    }
                }
            }while (pm.Length != 0);

            return(ret.ToArray());
        }
Пример #2
0
        protected object[] GetDetailsValues(string key)
        {
            ArrayList ret = new ArrayList();
            byte[] pm = new byte[0];
            do
            {
                object[] get = GetDetails(key, Maxvals, pm);

                pm = (byte[])get[1];
                get = (object[])get[0];
                foreach (object[] obj in get)
                {
                    OpenDHTMessageDetails details = new OpenDHTMessageDetails();
                    details.Data = (byte[])obj[0];
                    details.TTL = (int)obj[1];
                    details.Algo = (string)obj[2];
                    details.Hash = (byte[])obj[3];
                    object val = GetValue(details.Data);
                    if (val != null)
                        ret.Add(details);
                }
            }
            while (pm.Length != 0);

            return ret.ToArray();
        }