示例#1
0
 def register_watchers(self, type_callback_dict):
     for event_type, callback in type_callback_dict.items():
         self._push_watchers[event_type].add(callback)
     self.wait_for_response(RegisterMessage(event_list=type_callback_dict.keys()))
示例#2
0
 def register_watcher(self, event_type, callback):
     self._push_watchers[event_type].add(callback)
     self.wait_for_response(RegisterMessage(event_list=[event_type]))