Пример #1
0
    public void SendMessage(GInterface0 ginterface0_0)
    {
        LogManager.GetLogger("Base-Net-Out").Info <string, string, short>("[{tag}] Sending command {commandName} ({id})", this.method_2(), ginterface0_0.GetType().Name, ginterface0_0.Id);
        object obj = this.object_0;

        lock (obj)
        {
            this.method_5().Position = 3L;
            ginterface0_0.imethod_2(this.method_5());
            int num = (int)(this.method_5().Position - 3L);
            this.method_5().Position = 0L;
            this.method_5().WriteByte((num & 16711680) >> 16);
            this.method_5().smethod_7(num & 65535);
            aYQcxEOxrdELca8ma1k aYQcxEOxrdELca8ma1k = this.method_4();
            if (aYQcxEOxrdELca8ma1k != null)
            {
                aYQcxEOxrdELca8ma1k.imethod_0(this.byte_0, 0, num + 3);
            }
            try
            {
                this.Socket.method_3().GetStream().Write(this.byte_0, 0, num + 3);
            }
            catch
            {
            }
        }
        GClass82.GDelegate4 gdelegate = this.gdelegate4_0;
        if (gdelegate == null)
        {
            return;
        }
        gdelegate(ginterface0_0);
    }
Пример #2
0
    private bool method_15(BinaryStream binaryStream_2, int int_6)
    {
        if (!this.method_13(binaryStream_2, int_6))
        {
            return(false);
        }
        long position = this.method_7().Position;

        this.method_7().Position = 0L;
        short       num;
        GInterface0 ginterface = this.method_8(this.method_7(), out num);

        this.int_5++;
        ConnectionManager connection = this.Connection;

        if (connection != null)
        {
            connection.method_17();
        }
        if (ginterface != null)
        {
            try
            {
                Action <GInterface0> action = this.method_0();
                if (action != null)
                {
                    action(ginterface);
                }
                GClass82.GDelegate4 gdelegate = this.gdelegate4_1;
                if (gdelegate != null)
                {
                    gdelegate(ginterface);
                }
            }
            catch (Exception ex)
            {
                this.Log.Error(ex, "[{tag}] Error while executing command {commandName} {exception}", new object[]
                {
                    this.method_2(),
                    ginterface.GetType().FullName,
                    ex
                });
            }
        }
        this.method_11();
        return(true);
    }
Пример #3
0
    public void SendMessage(GInterface0 ginterface0_0)
    {
        LogManager.GetLogger("Base-Net-Out").Info <string, string, short>("[{tag}] Sending command {commandName} ({id})", this.method_2(), ginterface0_0.GetType().Name, ginterface0_0.Id);
        object obj = this.object_0;

        lock (obj)
        {
            this.method_6().Position = 2L;
            ginterface0_0.imethod_1(this.method_6());
            int num  = (int)(this.method_6().Position - 2L);
            int num2 = 2;
            if (num >= 65535)
            {
                this.method_6().Position = 0L;
                this.method_6().Write(ushort.MaxValue);
                this.method_6().Write((uint)num);
                ginterface0_0.imethod_1(this.method_6());
                num2 += 4;
            }
            else
            {
                this.method_6().Position = 0L;
                this.method_6().Write((short)num);
            }
            mEx4t12ZDFVtTbDWQkm mEx4t12ZDFVtTbDWQkm = this.method_4();
            mEx4t12ZDFVtTbDWQkm.imethod_0(this.byte_0, 0, num + num2);
            try
            {
                this.Socket.method_3().GetStream().Write(this.byte_0, 0, num + num2);
            }
            catch
            {
            }
        }
        GClass82.GDelegate4 gdelegate = this.gdelegate4_0;
        if (gdelegate == null)
        {
            return;
        }
        gdelegate(ginterface0_0);
    }