Ejemplo n.º 1
0
        private void c254_login()
        {
            String           name     = getString();
            String           password = getString();
            RegistrationInfo ri       = null;

            foreach (RegistrationInfo ri_ in mServer.RegInfos)
            {
                if (ri_.Name.Equals(name) && ri_.Password.Equals(password))
                {
                    ri = ri_;
                    break;
                }
            }
            if (ri == null)
            {
                mStream.WriteByte(0);
            }
            else
            {
                ri.RegenerateToken();
                mStream.WriteByte(1);
                mStream.Write(BitConverter.GetBytes(ri.Token), 0, 8);
                mRegInfo = ri;
            }
        }