Example #1
0
 def on_message(self, message):
     print(message)
     dbc.setStatusForComponentInDB(message)
     dbc.writeComponentsToJsonFile()
     for client in cl:
         client.write_message(decodejson())
Example #2
0
 def open(self):
     if self not in cl:
         cl.append(self)
         print("Connection accepted from:" + repr(self.request.remote_ip))
         dbc.writeComponentsToJsonFile()
         self.write_message(decodejson())