private void Work() { Message recivedMessage; do { recivedMessage = _sslChannel.ReciveMessage(); } while (MessageHandler(recivedMessage)); }
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; } }