Example #1
0
        private void Work()
        {
            Message recivedMessage;

            do
            {
                recivedMessage = _sslChannel.ReciveMessage();
            } while (MessageHandler(recivedMessage));
        }
Example #2
0
 public static void Authorization(string login, string pass)
 {
     lock (_sslChannel)
     {
         string command = login + "$" + pass;
         _sslChannel.SendMessage(new Message(Commands.Login, command));
         var recivedCommand = _sslChannel.ReciveMessage();
         Name         = recivedCommand.StringMessage;
         IsAuthorized = recivedCommand.Command == Commands.Ok;
     }
 }