Exemple #1
0
 def handle(self, data):
     
     print(data)
     
     from zombie.common import client_data_debug
     print(client_data_debug(data))
     
     client_id = data[0]
     if client_id in self.clients:
         self.client_code_actions[data[1]](data)
     elif client_id == 0:
         self.add_client(data)
     else:
         logging.warning('Unknown client id: %d', client_id)
 def send(self, data):
     from zombie.common import client_data_debug
     print(data)
     print(client_data_debug(self._client_id + data))
     
     self.socket.sendto(self._client_id + data, (self.server_ip, self.server_port))