def __init__(self): HTTPFactory.__init__(self) # We track all sub-protocols for response channel mapping self.reply_protocols = {} # Make a factory for WebSocket protocols self.ws_factory = WebSocketServerFactory("ws://127.0.0.1:8000") self.ws_factory.protocol = WebsocketProtocol self.ws_factory.reply_protocols = self.reply_protocols
def __init__(self, *args, **kwargs): """ @TODO: what happens if the connection is closed? (I don't believe cups.Connection is holding open a persistent connection, but this will need to be verified) """ HTTPFactory.__init__(self, *args, **kwargs) self._connection = cups.Connection()
def __init__(self, dbpool, cfg=None, wmscfg=None): HTTPFactory.__init__(self) self.dbpool = dbpool self.CFG = cfg self.WMSCFG = wmscfg proxy = cfg.get('proxy', None) # 'proxy' is required, but we # use .get for safety if proxy: self.proxy = urlparse.urlparse(proxy) else: self.proxy = None
def __init__(self, logPath=None, timeout=60*60*12, restrictedToPort=443): """ @param logPath: The same as for HTTPFactory. @param timeout: The same as for HTTPFactory. @param restrictedToPort: Only CONNECT requests to this port number are allowed. This may be None, in which case any port is allowed. @type restrictedToPort: C{int} or None """ assert restrictedToPort is None or type(restrictedToPort) is int, 'Invalid restrictedToPort value: %r' % (restrictedToPort,) self.restrictedToPort = restrictedToPort HTTPFactory.__init__(self, logPath, timeout)
def __init__(self, logPath=None, timeout=60 * 60 * 12, restrictedToPort=443): """ @param logPath: The same as for HTTPFactory. @param timeout: The same as for HTTPFactory. @param restrictedToPort: Only CONNECT requests to this port number are allowed. This may be None, in which case any port is allowed. @type restrictedToPort: C{int} or None """ assert restrictedToPort is None or type( restrictedToPort) is int, 'Invalid restrictedToPort value: %r' % ( restrictedToPort, ) self.restrictedToPort = restrictedToPort HTTPFactory.__init__(self, logPath, timeout)
def __init__(self): HTTPFactory.__init__(self) #self.agent = client.Agent(reactor, pool = client.HTTPConnectionPool(reactor)) self.agent = client.Agent(reactor, pool = SlowPool(reactor))
def __init__(self, allowed_address, *args, **kwargs): self.allowed_address = allowed_address HTTPFactory.__init__(self, *args, **kwargs)
def __init__(self, shet): self.shet = shet HTTPFactory.__init__(self)
def __init__(self, logPath=None, timeout=60*60*12): HTTPFactory.__init__(self, logPath,timeout)
def __init__(self): HTTPFactory.__init__(self) #self.agent = client.Agent(reactor, pool = client.HTTPConnectionPool(reactor)) self.agent = client.Agent(reactor, pool=SlowPool(reactor))