Beispiel #1
0
    public void imethod_4(string string_1, FeedbackVacancyBody feedbackVacancyBody_0)
    {
        byte[] stream = new byte[feedbackVacancyBody_0.BodyTotalLength];
        feedbackVacancyBody_0.ToStream(stream, 0);
        ExpectedVacancyBodyContract body       = new ExpectedVacancyBodyContract(stream);
        IMessageHandler             interface2 = this.interface9_0.imethod_4 <ExpectedVacancyBodyContract>(this.string_0, this.p2PSessionMessageTypeRoom_0.Help4UDP_FeedbackVacancy, body, string_1);

        this.interface31_0.imethod_3(interface2, null);
    }
Beispiel #2
0
    public void OnFeedbackVacancyReceived(string string_2, FeedbackVacancyBody feedbackVacancyBody_0)
    {
        P2PChannelState state = this.safeDictionary_0.Get(string_2);

        if ((state != null) && (this.FeedbackVacancyReceived != null))
        {
            this.FeedbackVacancyReceived(state.DestIPE.IPEndPoint_0, feedbackVacancyBody_0);
        }
    }
Beispiel #3
0
    private void method_6(IPEndPoint ipendPoint_0, FeedbackVacancyBody feedbackVacancyBody_0)
    {
        Class116 class2 = this.safeDictionary_0.Get(ipendPoint_0);

        if (class2 != null)
        {
            class2.method_18(feedbackVacancyBody_0, false);
        }
    }
Beispiel #4
0
 public void method_18(FeedbackVacancyBody feedbackVacancyBody_1, bool bool_1)
 {
     this.dateTime_1 = DateTime.Now;
     if (bool_1)
     {
         this.bool_0 = true;
     }
     if (feedbackVacancyBody_1.MinIDInReceivedCache >= this.feedbackVacancyBody_0.MinIDInReceivedCache)
     {
         this.feedbackVacancyBody_0 = feedbackVacancyBody_1;
         this.method_19(feedbackVacancyBody_1.MinIDInReceivedCache, feedbackVacancyBody_1.MaxIDInReceivedCache, feedbackVacancyBody_1.VacancyIDArray);
     }
 }
Beispiel #5
0
    private void CircleQuickly2()
    {
        int num  = 0;
        int num2 = 50;

        while (this.object_0 == 0)
        {
            try
            {
                Thread.Sleep(100);
                foreach (Class100 class2 in this.safeDictionary_1.GetAllReadonly())
                {
                    FeedbackVacancyBody body = class2.method_15();
                    if (body != null)
                    {
                        this.class32_0.imethod_1(class2.imethod_1(), body);
                    }
                }
                if ((num % num2) == 0)
                {
                    foreach (Class116 class3 in this.safeDictionary_0.GetAllReadonly())
                    {
                        class3.method_22();
                        class3.method_21();
                    }
                    foreach (Class100 class2 in this.safeDictionary_1.GetAllReadonly())
                    {
                        class2.method_17();
                    }
                }
                num++;
                continue;
            }
            catch (Exception exception)
            {
                this.emptyAgileLogger_0.Log(exception, "CJFramework.Engine.Udp.Reliable.ReliableUdpEngine.CircleQuickly2", ErrorLevel.Standard);
                continue;
            }
        }
    }
Beispiel #6
0
    public void imethod_1(IPEndPoint ipendPoint_0, FeedbackVacancyBody feedbackVacancyBody_0)
    {
        string str = null;

        using (List <P2PChannelState> .Enumerator enumerator = this.safeDictionary_0.GetAll().GetEnumerator())
        {
            P2PChannelState current;
            while (enumerator.MoveNext())
            {
                current = enumerator.Current;
                if (current.DestIPE.Equals(new AgileIPE(ipendPoint_0)))
                {
                    goto Label_003F;
                }
            }
            goto Label_0056;
Label_003F:
            str = current.DestUserID;
        }
Label_0056:
        this.interface30_0.imethod_4(str, feedbackVacancyBody_0);
    }
Beispiel #7
0
 public void imethod_1(IPEndPoint ipendPoint_0, FeedbackVacancyBody feedbackVacancyBody_0)
 {
 }
Beispiel #8
0
    public IMessageHandler ProcessMessage(IMessageHandler interface37_0)
    {
        UserAddressInfo           userData;
        PublicIPEResponseContract contract;

        if (interface37_0.Header.MessageType == this.object_0.InviteTcpP2P)
        {
            userData = this.interface30_0.GetUserData(interface37_0.Header.UserID);
            if (this.class42_0 != null)
            {
                this.class42_0.P2PConnectAsyn(userData);
            }
            return(null);
        }
        if (interface37_0.Header.MessageType == this.object_0.InviteUdpP2P)
        {
            userData = this.interface30_0.GetUserData(interface37_0.Header.UserID);
            if (this.FdkyIcOiQh != null)
            {
                this.FdkyIcOiQh.P2PConnectAsyn(userData);
            }
            return(null);
        }
        if (interface37_0.Header.MessageType == this.object_0.Help4UDP_FeedbackVacancy)
        {
            ExpectedVacancyBodyContract contract2 = this.interface9_0.imethod_1 <ExpectedVacancyBodyContract>(interface37_0);
            FeedbackVacancyBody         body      = FeedbackVacancyBody.Parse(contract2.Buff, 0, contract2.Buff.Length);
            if (this.FdkyIcOiQh != null)
            {
                this.FdkyIcOiQh.OnFeedbackVacancyReceived(interface37_0.Header.UserID, body);
            }
            return(null);
        }
        if (interface37_0.Header.MessageType == this.object_0.Help4UDP_SynAck)
        {
            if (this.FdkyIcOiQh != null)
            {
                contract = this.interface9_0.imethod_1 <PublicIPEResponseContract>(interface37_0);
                this.FdkyIcOiQh.OnSynAckReceived(new IPEndPoint(IPAddress.Parse(contract.IP), contract.PublicPort), interface37_0.Header.UserID);
            }
            return(null);
        }
        if (interface37_0.Header.MessageType == this.object_0.Help4UDP_Exit)
        {
            if (this.FdkyIcOiQh != null)
            {
                contract = this.interface9_0.imethod_1 <PublicIPEResponseContract>(interface37_0);
                this.FdkyIcOiQh.OnExitReceived(interface37_0.Header.UserID, new IPEndPoint(IPAddress.Parse(contract.IP), contract.PublicPort));
            }
            return(null);
        }
        if (interface37_0.Header.MessageType == this.object_0.Help4UDP_PMTUTestAck)
        {
            if (this.FdkyIcOiQh != null)
            {
                GClass1 class2 = this.interface9_0.imethod_1 <GClass1>(interface37_0);
                this.FdkyIcOiQh.OnPMTUTestAckReceived(interface37_0.Header.UserID, class2.Pmtu);
            }
            return(null);
        }
        return(null);
    }
Beispiel #9
0
    public static Class156 IHeader4(ulong ulong_0, ulong ulong_1, ulong[] ulong_2)
    {
        FeedbackVacancyBody body = new FeedbackVacancyBody(ulong_0, ulong_1, ulong_2);

        return(new Class156(new IHeader1(4, byte_0, (ushort)body.BodyTotalLength), body));
    }
Beispiel #10
0
 private void udpClient_DataReceived(IPEndPoint ipendPoint_0, byte[] byte_0)
 {
     try
     {
         IHeader1 class2 = IHeader1.smethod_0(byte_0);
         if (class2 != null)
         {
             if (class2.method_0() == 0)
             {
                 IPEndPointBody class4 = IPEndPointBody.smethod_0(byte_0, 4, class2.method_4());
                 this.OnUdpSessionOpened(class2.method_2(), class4.method_0(), ipendPoint_0, new AgileIPE(class4.method_2(), class4.method_4()));
             }
             else if (class2.method_0() == 1)
             {
                 this.OnUdpSessionOpened(ipendPoint_0, StringBody.smethod_0(byte_0, 4, class2.method_4()).method_0());
             }
             else
             {
                 Class100 class3;
                 if (class2.method_0() == 2)
                 {
                     class3 = this.safeDictionary_1.Get(ipendPoint_0);
                     if ((class3 != null) && (class3.method_1() == class2.method_2()))
                     {
                         DataFragmentBody class7 = DataFragmentBody.smethod_0(byte_0, 4, class2.method_4());
                         class3.method_8(class7);
                     }
                 }
                 else if (class2.method_0() == 4)
                 {
                     FeedbackVacancyBody body   = FeedbackVacancyBody.Parse(byte_0, 4, class2.method_4());
                     Class116            class5 = this.safeDictionary_0.Get(ipendPoint_0);
                     if (class5 != null)
                     {
                         class5.method_18(body, true);
                     }
                 }
                 else if (class2.method_0() == 5)
                 {
                     this.method_2(ipendPoint_0);
                 }
                 else if (class2.method_0() == 6)
                 {
                     class3 = this.safeDictionary_1.Get(ipendPoint_0);
                     if (class3 != null)
                     {
                         class3.method_9();
                     }
                 }
                 else if (class2.method_0() == 7)
                 {
                     class3 = this.safeDictionary_1.Get(ipendPoint_0);
                     if ((class3 != null) && (class3.method_1() == class2.method_2()))
                     {
                         Class154 class8 = Class154.smethod_0(byte_0, 4, class2.method_4());
                         ushort   num    = (ushort)(0x2c + class8.BodyTotalLength);
                         this.class32_0.imethod_2(class3.imethod_2(), num);
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         this.emptyAgileLogger_0.Log(exception, "CJFramework.Engine.Udp.Reliable.ReliableUdpEngine.udpClient_DataReceived", ErrorLevel.Standard);
     }
 }