def start(self):
'''
start the aggregator, and connect to the control port
'''
# This call can return a list of connectors, or a single connector
self.connector_list = connect(self, self.tor_control_port)
# Twisted doesn't want a list of connectors, it only wants one
self.connector = choose_a_connection(self.connector_list)
self.rotator = task.LoopingCall(self._do_rotate)
rotator_deferred = self.rotator.start(self.rotate_period, now=False)
rotator_deferred.addErrback(errorCallback)
# if we've already built the protocol before starting
if self.protocol is not None:
self.protocol.startCollection(self.collection_counters)
评论列表
文章目录