def __init__(self, dispatcher, connection, address, use_ssl, ssl_certfile, ssl_keyfile):
        Session.__init__(self, dispatcher)
        self.use_ssl = use_ssl
        self.raw_connection = connection
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(
                connection,
                server_side=True,
                certfile=ssl_certfile,
                keyfile=ssl_keyfile,
                ssl_version=ssl.PROTOCOL_SSLv23,
                do_handshake_on_connect=False)
        else:
            self._connection = connection

        self.address = address[0] + ":%d"%address[1]
        self.name = "TCP " if not use_ssl else "SSL "
        self.timeout = 1000
        self.dispatcher.add_session(self)
        self.response_queue = queue.Queue()
        self.message = ''
        self.retry_msg = ''
        self.handshake = not self.use_ssl
        self.need_write = True
 def __init__(self, dispatcher, session_id):
     Session.__init__(self, dispatcher)
     self.pending_responses = Queue.Queue()
     self.address = session_id
     self.name = "HTTP"
     self.timeout = 60
     self.dispatcher.add_session(self)
    def __init__(self, dispatcher, poller, connection, address, use_ssl, ssl_certfile, ssl_keyfile):
        Session.__init__(self, dispatcher)
        self.use_ssl = use_ssl
        self.poller = poller
        self.raw_connection = connection
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(
                connection,
                server_side=True,
                certfile=ssl_certfile,
                keyfile=ssl_keyfile,
                ssl_version=ssl.PROTOCOL_SSLv23,
                do_handshake_on_connect=False)
        else:
            self._connection = connection

        self.address = address[0] + ":%d"%address[1]
        self.name = "TCP " if not use_ssl else "SSL "
        self.timeout = 1000
        self.dispatcher.add_session(self)
        self.response_queue = queue.Queue()
        self.message = ''
        self.retry_msg = ''
        self.handshake = not self.use_ssl
 def __init__(self, dispatcher, session_id):
     Session.__init__(self, dispatcher)
     self.pending_responses = Queue.Queue()
     self.address = session_id
     self.name = "HTTP"
     self.timeout = 60
     self.dispatcher.add_session(self)
    def __init__(self, dispatcher, connection, address):
        Session.__init__(self, dispatcher)
        self.raw_connection = connection
        self._connection = connection

        self.address = address[0] + ":%d" % address[1]
        self.name = "TCP "
        self.timeout = 1000
        self.dispatcher.add_session(self)
        self.response_queue = queue.Queue()
        self.message = ''
        self.retry_msg = ''
        self.handshake = True
        self.mode = None
    def __init__(self, connection, address, use_ssl, ssl_certfile, ssl_keyfile):
        Session.__init__(self)
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(
                connection,
                server_side=True,
                certfile=ssl_certfile,
                keyfile=ssl_keyfile,
                ssl_version=ssl.PROTOCOL_SSLv23)
        else:
            self._connection = connection

        self.address = address[0]
        self.name = "TCP"
Exemple #7
0
    def __init__(self, connection, address, use_ssl, ssl_certfile,
                 ssl_keyfile):
        Session.__init__(self)
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(connection,
                                               server_side=True,
                                               certfile=ssl_certfile,
                                               keyfile=ssl_keyfile,
                                               ssl_version=ssl.PROTOCOL_SSLv23)
        else:
            self._connection = connection

        self.address = address[0]
        self.name = "TCP " if not use_ssl else "SSL "
    def __init__(self, connection, address, use_ssl, ssl_certfile, ssl_keyfile):
        Session.__init__(self)
        self.use_ssl = use_ssl
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(
                connection,
                server_side=True,
                certfile=ssl_certfile,
                keyfile=ssl_keyfile,
                ssl_version=ssl.PROTOCOL_SSLv23,
                do_handshake_on_connect=False)
        else:
            self._connection = connection

        self.address = address[0]
        self.name = "TCP " if not use_ssl else "SSL "
        self.response_queue = queue.Queue()
Exemple #9
0
    def __init__(self, connection, address, use_ssl, ssl_certfile,
                 ssl_keyfile):
        Session.__init__(self)
        self.use_ssl = use_ssl
        if use_ssl:
            import ssl
            self._connection = ssl.wrap_socket(connection,
                                               server_side=True,
                                               certfile=ssl_certfile,
                                               keyfile=ssl_keyfile,
                                               ssl_version=ssl.PROTOCOL_SSLv23,
                                               do_handshake_on_connect=False)
        else:
            self._connection = connection

        self.address = address[0]
        self.name = "TCP " if not use_ssl else "SSL "
        self.response_queue = queue.Queue()
 def __init__(self, session_id):
     Session.__init__(self)
     self.pending_responses = Queue.Queue()
     self.address = session_id
     self.name = "HTTP"
 def __init__(self, connection, address):
     Session.__init__(self)
     self._connection = connection
     self.address = address[0]
     self.name = "TCP"
Exemple #12
0
 def __init__(self, session_id):
     Session.__init__(self)
     self.pending_responses = Queue.Queue()
     self.address = session_id
     self.name = "HTTP"