def start(self): server = Networking.instance.get_server() con = ClockNetworking.instance.get_connection() server.register_message_listener(con, "clock_time_listener", self.time_listener) request = IXPFile() request.set_network_function("com.projectgame.clock.clock.registertotimeservice") request.add_info("functionName", "clock_time_listener") server.no_response_request(con, request)
def start(self): server = Networking.instance.get_server() con = ClockNetworking.instance.get_connection() server.register_message_listener(con, self.__FUNCTION_TIMER_STARTED, self.__network_timer_started) server.register_message_listener(con, self.__FUNCTION_TIMER_STOPPED, self.__network_timer_stopped) server.register_message_listener(con, self.__FUNCTION_TIMER_UPDATED, self.__network_timer_updated) server.register_message_listener(con, self.__FUNCTION_TIMER_CALLED, self.__network_timer_called) request = IXPFile() request.set_network_function("com.projectgame.clock.timer.registertotimerservice") request.add_info("startedFunction", self.__FUNCTION_TIMER_STARTED) request.add_info("stoppedFunction", self.__FUNCTION_TIMER_STOPPED) request.add_info("updatedFunction", self.__FUNCTION_TIMER_UPDATED) request.add_info("calledFunction", self.__FUNCTION_TIMER_UPDATED) server.no_response_request(con, request)