Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

Page 4 of 6 FirstFirst 123456 LastLast
Results 46 to 60 of 81
  1. #46
    ส็็็็็็็ Bloodraven is offline
    MemberRank
    Sep 2009 Join Date
    AntarcticaLocation
    2,414Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    How come you ended the Stream? I was enjoying lol.

  2. #47
    this is title Shredinator is offline
    MemberRank
    May 2011 Join Date
    399Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    "Personal time"

  3. #48
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by zJordan View Post
    Been on the live stream for about 20 minutes, Having issues with your stresstest I see.
    Yeah, great wasn't it ;p

  4. #49
    Account Upgraded | Title Enabled! W00dL3cs is offline
    MemberRank
    Mar 2012 Join Date
    202Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    You're having problems with the "CanCreateRoomComposer" and what follows, isn't that?

  5. #50
    Freak Mextur is offline
    MemberRank
    Mar 2012 Join Date
    216Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by W00dL3cs View Post
    You're having problems with the "CanCreateRoomComposer" and what follows, isn't that?
    No, thats fK easy.

  6. #51
    Account Upgraded | Title Enabled! W00dL3cs is offline
    MemberRank
    Mar 2012 Join Date
    202Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by Mextur View Post
    No, thats fK easy.
    It is not what I'm refering to...

    When you are on the point of creating the room, the client splits the packet to send you, and you need multiple receive requests to get it all :P

  7. #52
    Freak Mextur is offline
    MemberRank
    Mar 2012 Join Date
    216Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    It handles multiply requests.,i dont really get,your point.
    Posted via Mobile Device

  8. #53
    Account Upgraded | Title Enabled! W00dL3cs is offline
    MemberRank
    Mar 2012 Join Date
    202Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by Mextur View Post
    It handles multiply requests.,i dont really get,your point.
    Posted via Mobile Device
    This is the packet you should receive:

    Code:
    @]@Casd@Gmodel_a
    Instead, you receive it splitted in different receives:

    Code:
    @]@Cas
    Then

    Code:
    d@Gmod
    And finally

    Code:
    el_a
    Of course you can't process it this way, so you need to find some method to store it until it's done (check length etc..)

  9. #54
    Freak Mextur is offline
    MemberRank
    Mar 2012 Join Date
    216Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Dude that's already done?

    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;
    
    using Tazqon.Packets.Components;
    
    namespace Tazqon.Packets.Messages
    {
        class PacketEvent
        {
            /// <summary>
            /// Packet his Header
            /// </summary>
            public short Id { get; private set; }
    
            /// <summary>
            /// Packet his content
            /// </summary>
            public byte[] Content { get; private set; }
    
            /// <summary>
            /// To navigate in content.
            /// </summary>
            public int Pointer { get; private set; }
    
            /// <summary>
            /// Remaining Lenght of the pointers.
            /// </summary>
            public int RemainingLength
            {
                get
                {
                    return (Content.Length - Pointer);
                }
            }
    
            /// <summary>
            /// Tries to get info and returns the length
            /// </summary>
            /// <param name="Bytes"></param>
            /// <param name="ReadStream"> </param>
            /// <param name="Length"></param>
            public bool TryGetInfo(ref byte[] Bytes, BinaryReader ReadStream, out int Length)
            {
                try
                {
                    Length = Base64Encoding.DecodeInt32(ReadStream.ReadBytes(3));
                    Id = (short)Base64Encoding.DecodeInt32(ReadStream.ReadBytes(2));
    
                    Content = ReadStream.ReadBytes(Length - 2);
    
                    this.Pointer = 0;
                }
                catch
                {
                    Length = 0;
                }
    
                if (Length > 0)
                {
                    Length += 3;
                }
    
                return Length > 0;
            }
    
            /// <summary>
            /// Returns an integer decoded.
            /// </summary>
            /// <returns></returns>
            public int PopInt32()
            {
                try
                {
                    using (var Stream = new BinaryReader(new MemoryStream(Content)))
                    {
                        Stream.ReadBytes(Pointer);
    
                        byte[] WorkBytes = Stream.ReadBytes(RemainingLength < Wire64Encoding.MAX_INTEGER_BYTE_AMOUNT ? RemainingLength : Wire64Encoding.MAX_INTEGER_BYTE_AMOUNT);
    
                        int Length;
                        int Result = Wire64Encoding.DecodeInt32(WorkBytes, out Length);
    
                        Pointer += Length;
    
                        return Result;
                    }
                }
                catch
                {
                    return -1;
                }
            }
    
            /// <summary>
            /// Returns an string decoded.
            /// </summary>
            /// <returns></returns>
            public string PopString()
            {
                try
                {
                    using (var Stream = new BinaryReader(new MemoryStream(Content)))
                    {
                        Stream.ReadBytes(Pointer);
    
                        int Length = Base64Encoding.DecodeInt32(Stream.ReadBytes(2));
                        Pointer += 2;
                        Pointer += Length;
    
                        string Output = Encoding.ASCII.GetString(Stream.ReadBytes(Length));
    
                        Output = Output.Replace(Convert.ToChar(1), ' ');
                        Output = Output.Replace(Convert.ToChar(2), ' ');
                        Output = Output.Replace(Convert.ToChar(3), ' ');
                        Output = Output.Replace(Convert.ToChar(9), ' ');
    
                        return Output;
                    }
                }
                catch
                {
                    return string.Empty;
                }
            }
    
            /// <summary>
            /// Returns and boolean decoded.
            /// </summary>
            /// <returns></returns>
            public bool PopBoolean()
            {
                return PopInt32() > 0;
            }
    
            /// <summary>
            /// Returns an ICollection of popped integers.
            /// </summary>
            /// <returns></returns>
            public ICollection<int> PopCollection()
            {
                ICollection<int> Output = new List<int>();
    
                int Length = PopInt32();
    
                for (int i = 0; i < Length; i++)
                {
                    int Obj = PopInt32();
    
                    if (!Output.Contains(Obj))
                    {
                        Output.Add(Obj);
                    }
                }
    
                return Output;
            }
        }
    }
    Works?


  10. #55
    Account Upgraded | Title Enabled! Imagician is offline
    MemberRank
    Sep 2010 Join Date
    244Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Wichard Livestreaming again pls?

  11. #56
    Freak Mextur is offline
    MemberRank
    Mar 2012 Join Date
    216Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by Imagician View Post
    Wichard Livestreaming again pls?
    Not today I got a bithday.

  12. #57
    Chasing 99 Red Balloons Jordan is offline
    MemberRank
    Jan 2008 Join Date
    UKLocation
    1,763Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    You never check if the data is available before reading it, this could cause an out of bounds error or a null pointer exception

  13. #58
    Valued Member BetterWay is offline
    MemberRank
    Dec 2011 Join Date
    The NetherlandsLocation
    146Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by Jordan View Post
    You never check if the data is available before reading it, this could cause an out of bounds error or a null pointer exception
    He return's by almost every function -1 when not-valid, when he uses one of those function's he check's if it return's -1 or not, not = future, when it is -1 no future.

  14. #59
    Freak Mextur is offline
    MemberRank
    Mar 2012 Join Date
    216Posts
    Quote Originally Posted by BetterWay View Post
    He return's by almost every function -1 when not-valid, when he uses one of those function's he check's if it return's -1 or not, not = future, when it is -1 no future.
    Posted via Mobile Device yea what he says- talk more crap dudes.

  15. #60
    Chasing 99 Red Balloons Jordan is offline
    MemberRank
    Jan 2008 Join Date
    UKLocation
    1,763Posts

    Re: Tazqon [C#, R63, OS, SS, SQL, FREEWARE]

    Quote Originally Posted by Mextur View Post
    Posted via Mobile Device yea what he says- talk more crap dudes.
    I'm sorry if you can't take constructive criticism and deem other developers to be talking "crap", i was referring to
    PHP Code:
                    Length Base64Encoding.DecodeInt32(ReadStream.ReadBytes(3));
                    
    Id = (short)Base64Encoding.DecodeInt32(ReadStream.ReadBytes(2));

                    
    Content ReadStream.ReadBytes(Length 2);

                    
    this.Pointer 0
    It would be more efficient to check if the bytes are available instead of relying on a catch statement in most cases.



Page 4 of 6 FirstFirst 123456 LastLast

Advertisement