Author: Not specified Language: python
Description: Not specified Timestamp: 2013-05-18 19:57:51 +0000
View raw paste Reply
  1. class ProjectIdeaFactoryFactory(protocol.ClientFactory):
  2.     def __init__(self):
  3.         pass
  4.  
  5.     def buildProtocol(self, addr):
  6.         p = ProjectIdeaFactory()
  7.         p.factory = self
  8.         return p
  9.  
  10.     def clientConnectionLost(self, connector, reason):
  11.         connector.connect()
  12.  
  13.     def clientConnectionFailed(self, connector, reason):
  14.         print 'connection failed:', reason
  15.         reactor.stop()
  16.  
  17. class ProjectIdeaFactoryFactoryFactory:
  18.     def createFactoryFactory(self):
  19.         return ProjectIdeaFactoryFactory()
View raw paste Reply