soren
By: a guest | Mar 12th, 2010 | Syntax:
Python | Size: 0.32 KB | Hits: 51 | Expires: Never
class Poller(object):
def __init__(self, targets):
self.targets = targets
self.factory = MyClientFactory()
def poll():
for target in self.targets:
reactor.connectTCP(target[0], target[1], factory)
class MyClientFactory(ClientFactory):
protocol = DataCollectionProtocol