Exemplo n.º 1
0
 def send_message(self, code, data=None):
     MessageHandler.send_message('{}:{}'.format(code, data), self.socket)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def acknowledge_login(self, client_socket):
     MessageHandler.send_message('{}:OK'.format(Code.ACK_LOGIN),
                                 client_socket)
Exemplo n.º 4
0
 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])