def connectionMade(self): self.max_buffer_size = 104857600 self.buffer = "" self.transport.pauseProducing() if hasattr(self.factory, "handler"): connection = Connection(self) self.attach(connection) self.transport.registerProducer(self, False) if hasattr(self.factory, "handler"): self.factory.handler(connection) if self.connect_cb: cb = self.connect_cb self.connect_cb = None cb(None)
def __init__(self, ssl_options=None): if ssl_options is None: ssl_options = {} Connection.__init__(self) self.ssl_options = ssl_options
def __init__(self, *args, **kwargs): Connection.__init__(self, *args, **kwargs) self.ssl_options = None
def __init__(self, *args, **kwargs): Connection.__init__(self, *args, **kwargs) self.ssl_options = None self._connection_timeout = "unknown"
def __init__(self, *args, **kwargs): Connection.__init__(self, *args, **kwargs) self._connection_timeout = "unknown"
def handle_accept(self): (conn, addr) = self.accept() connection = Connection(_Connection(sock=conn)) connection._stack_conn.attach(connection) self.handler(connection)