예제 #1
0
        public void ChatUsers(ClientSockets client)
        {
            var list = new LoginClass().ChatUsers();
            var data = _SM.ChatUsers(list);

            client.SendMessage(data);
        }
예제 #2
0
        public void UserValidation(BinaryReader br, ClientSockets client)
        {
            string   uname, pwd;
            Usertype utype;

            uname = br.ReadString().DecryptText();
            pwd   = br.ReadString().DecryptText();
            utype = (Usertype)br.ReadString().DecryptText().TextToEnum <Usertype>();

            LoginClass lc = new LoginClass();

            lc.SetValues(uname, pwd, utype);
            var IsValidated = lc.CheckLogin();

            var data = _SM.UserValidation(IsValidated);

            client.SendMessage(data);
            client.Name        = lc.GetNameOfUser(uname);
            client.IsValidated = true;
        }