Example #1
0
 public void Write(UruStream s)
 {
     s.WriteUInt(fParentIdx);
     s.WriteUInt(fChildIdx);
     s.WriteUInt(fSaverIdx);
     s.WriteByte(0);
 }
Example #2
0
 public void Write(UruStream s)
 {
     s.WriteByte((byte)fType);
     s.WriteUShort(fSockHeaderSize);
     s.WriteUInt(fBuildID);
     s.WriteUInt((uint)fBuildType);
     s.WriteUInt(fBranchID);
     s.WriteBytes(fProductID.ToByteArray());
 }
Example #3
0
        protected virtual bool NetCliConnect(int g)
        {
            UruStream s = new UruStream(new NetworkStream(fSocket, false));

            //NetCliConnect
            ISetupKeys(g);
            s.BufferWriter();
            s.WriteByte((byte)NetCliConnectMsg.kNetCliConnect);
            s.WriteByte(66);
            s.WriteBytes(fDhData);
            s.FlushWriter();

            //Recv NetCliEncrypt
            if (s.ReadByte() != (byte)NetCliConnectMsg.kNetCliEncrypt) { fSocket.Close(); return false; }
            byte[] seed = s.ReadBytes((int)(s.ReadByte() - 2));
            ISetupEncryption(seed);

            s.Close();
            return true;
        }