def send_message(self, code, data=None): MessageHandler.send_message('{}:{}'.format(code, data), self.socket)
def send_users_info(self, client_socket): self.update( ) # TODO: Place update call when client logs in and logs out message = '{}:{}'.format(Code.USERS_INFO, str(self.client_names)) MessageHandler.send_message(message, client_socket)
def acknowledge_login(self, client_socket): MessageHandler.send_message('{}:OK'.format(Code.ACK_LOGIN), client_socket)
def notify(self, code, data): """Sends Conversation IDs, forwards messages and exit statuses""" message = '{}:{}'.format(code, data) MessageHandler.send_message(message, *[t.socket for t in self.participants])