Ejemplo n.º 1
0
        public void CreatePacket(UInt64 TransactionID, UInt32 Result, redBuffer Data, SteamClient Client)
        {
            _TransactionID = TransactionID;
            _XUID = Client.XUID;
            _Username = SteamCrypto.fnv1_hash(Client.Username);
            _Type = Result;
            _Seed = (UInt32)(new Random((Int32)DateTime.Now.Ticks).Next());
            _IP = (UInt32)Client.GetIP().Address; // We will only use ipv4 so we ignore that it's deprecated.

            _Data = new Byte[Data.Length()];
            Array.Copy(Data.GetBuffer(), _Data, Data.Length());
        }
Ejemplo n.º 2
0
        public void CreatePacket(UInt64 TransactionID, UInt32 Result, redBuffer Data, SteamClient Client)
        {
            _TransactionID = TransactionID;
            _XUID          = Client.XUID;
            _Username      = SteamCrypto.fnv1_hash(Client.Username);
            _Type          = Result;
            _Seed          = (UInt32)(new Random((Int32)DateTime.Now.Ticks).Next());
            _IP            = (UInt32)Client.GetIP().Address; // We will only use ipv4 so we ignore that it's deprecated.

            _Data = new Byte[Data.Length()];
            Array.Copy(Data.GetBuffer(), _Data, Data.Length());
        }
Ejemplo n.º 3
0
        public static Byte[] QuickMessage(UInt64 TransactionID, UInt32 Type, String Data, SteamClient Client)
        {
            NetworkPacket NewPacket = new NetworkPacket();
            redBuffer NewBuffer = new redBuffer();

            NewBuffer.WriteBlob(Encoding.ASCII.GetBytes(Data));
            NewPacket.CreatePacket(TransactionID, Type, NewBuffer, Client);

            NewBuffer = new redBuffer();
            NewPacket.Serialize(ref NewBuffer, Client);

            return NewBuffer.GetBuffer();
        }
Ejemplo n.º 4
0
        public static Byte[] QuickMessage(UInt64 TransactionID, UInt32 Type, String Data, SteamClient Client)
        {
            NetworkPacket NewPacket = new NetworkPacket();
            redBuffer     NewBuffer = new redBuffer();

            NewBuffer.WriteBlob(Encoding.ASCII.GetBytes(Data));
            NewPacket.CreatePacket(TransactionID, Type, NewBuffer, Client);

            NewBuffer = new redBuffer();
            NewPacket.Serialize(ref NewBuffer, Client);

            return(NewBuffer.GetBuffer());
        }