Пример #1
0
 // Token: 0x060003FA RID: 1018 RVA: 0x0002B0C4 File Offset: 0x000292C4
 public void tp(int i)
 {
     for (;;)
     {
         Thread.Sleep(1);
         \u0008\u2001        u0008_u = null;
         List <\u0008\u2001> req     = this.REQ;
         lock (req)
         {
             if (this.REQ.Count > 0)
             {
                 u0008_u = this.REQ[0];
                 this.REQ.RemoveAt(0);
             }
         }
         if (u0008_u != null)
         {
             \u000E\u2000.\u0003(new object[]
             {
                 u0008_u.\u0002,
                 u0008_u.\u0003
             });
             u0008_u.\u0005 = true;
         }
     }
 }
Пример #2
0
        // Token: 0x06000174 RID: 372 RVA: 0x000133D0 File Offset: 0x000115D0
        public void b_read(IAsyncResult ar)
        {
            checked
            {
                if (!(!this.CN | this.\u0006))
                {
                    try
                    {
                        int num = 0;
                        try
                        {
                            num = this.Client.Client.EndReceive(ar);
                        }
                        catch (SocketException ex)
                        {
                            this.\u0008 = ex.SocketErrorCode.ToString();
                            goto IL_38C;
                        }
                        if (num <= 0)
                        {
                            goto IL_38C;
                        }
                        \u000E\u2000.\u0006 += unchecked ((long)num);
                        if (this.Length == -1L)
                        {
                            if (this.b[0] == 0)
                            {
                                byte[] array = this.M.ToArray();
                                this.Length = Conversions.ToLong(\u000E.\u0002(ref array));
                                this.M.Dispose();
                                this.M = new MemoryStream();
                                if (this.Length == 0L)
                                {
                                    this.Length = -1L;
                                    if (this.L == null & !this.isPL)
                                    {
                                        this.\u0008 = \u0006\u2001.\u0002(-1829118260);
                                        goto IL_38C;
                                    }
                                    int num2 = (int)Math.Round(unchecked (DateAndTime.Now.Subtract(this.lastPing).TotalMilliseconds - 10.0) / 1.5);
                                    if (num2 < 0)
                                    {
                                        num2 = 0;
                                    }
                                    if (num2 > 999)
                                    {
                                        num2 = 999;
                                    }
                                    this.lastPing = DateAndTime.Now;
                                    this.IsPNGED  = false;
                                    string              text    = \u0006\u2001.\u0002(-1829129003) + \u000E\u2000.\u000E + num2.ToString(\u0006\u2001.\u0002(-1829118711));
                                    \u0008\u2001        u0008_u = new \u0008\u2001(this, \u000E.\u0002(ref text));
                                    List <\u0008\u2001> req     = this.SK.REQ;
                                    lock (req)
                                    {
                                        this.SK.REQ.Add(u0008_u);
                                        goto IL_1D6;
                                    }
IL_1D0:
                                    Thread.Sleep(1);
IL_1D6:
                                    if (u0008_u.\u0005)
                                    {
                                        goto IL_323;
                                    }
                                    goto IL_1D0;
                                }
                                else
                                {
                                    this.b = new byte[(int)(this.Length - 1L) + 1];
                                }
                            }
                            else
                            {
                                this.M.WriteByte(this.b[0]);
                            }
                        }
                        else
                        {
                            this.M.Write(this.b, 0, num);
                            if (this.M.Length == this.Length)
                            {
                                this.Length = -1L;
                                \u0008\u2001        u0008_u2 = new \u0008\u2001(this, this.M.ToArray());
                                List <\u0008\u2001> req2     = this.SK.REQ;
                                lock (req2)
                                {
                                    this.SK.REQ.Add(u0008_u2);
                                    goto IL_299;
                                }
IL_293:
                                Thread.Sleep(1);
IL_299:
                                if (!u0008_u2.\u0005)
                                {
                                    goto IL_293;
                                }
                                this.M.Dispose();
                                this.M = new MemoryStream();
                                this.b = new byte[1];
                            }
                            else
                            {
                                this.b = new byte[(int)(this.Length - this.M.Length - 1L) + 1];
                            }
                        }
                        Thread.Sleep(1);
                    }
                    catch (Exception ex2)
                    {
                        this.\u0008 = \u0006\u2001.\u0002(-1829118689);
                        goto IL_38C;
                    }
IL_323:
                    if (!this.CN)
                    {
                        return;
                    }
                    try
                    {
                        this.Client.Client.BeginReceive(this.b, 0, this.b.Length, SocketFlags.None, new AsyncCallback(this.b_read), null);
                        return;
                    }
                    catch (SocketException ex3)
                    {
                        this.\u0008 = ex3.SocketErrorCode.ToString();
                    }
                }
IL_38C:
                this.CN = false;
            }
        }