Ejemplo n.º 1
0
    def run_client(self):
        """
        Responsible for the logic for this part of the program.
        Creates necessary objects, chooses reciever, gets message, appends header
        and sends message. If message is successful displays sent message.
        Continues to loop until user exits the program.
        """
        flag1 = True
        while flag1:
            self.client = TauClient()
            self.choose_receiver()

            self.get_message()
            if self.message == "exit":
                self.exit_program()
            else:
                self.append_header()
                success = self.client.connect_client(self.address,
                                                     self.message)

                if not success == -1:
                    print self.message