(self, host, port, socket_family=socket.AF_INET,
                 client_timeout=3000, backlog=128,
                 ssl_context=None, certfile='cert.pem',
                 ciphers=RESTRICTED_SERVER_CIPHERS)
Initialize a TSSLServerSocket

        @param certfile(str)        The server cert pem filename
        @param ciphers(list<str>)   The cipher suites to allow
        @param ssl_context(SSLContext)  Customize the SSLContext, can be used
            to persist SSLContext object. Caution it's easy to get wrong, only
            use if you know what you're doing.
Initialize a TSSLServerSocket
Initialize a TSSLServerSocket
def __init__(self, host, port, socket_family=socket.AF_INET,
                 client_timeout=3000, backlog=128,
                 ssl_context=None, certfile='cert.pem',
                 ciphers=RESTRICTED_SERVER_CIPHERS):
        """Initialize a TSSLServerSocket

        @param certfile(str)        The server cert pem filename
        @param ciphers(list<str>)   The cipher suites to allow
        @param ssl_context(SSLContext)  Customize the SSLContext, can be used
            to persist SSLContext object. Caution it's easy to get wrong, only
            use if you know what you're doing.
        """
        super(TSSLServerSocket, self).__init__(
            host=host, port=port, socket_family=socket_family,
            client_timeout=client_timeout, backlog=backlog)

        if ssl_context:
            self.ssl_context = ssl_context
        else:
            if not os.access(certfile, os.R_OK):
                raise IOError('No such certfile found: %s' % certfile)

            self.ssl_context = create_thriftpy_context(server_side=True,
                                                       ciphers=ciphers)
            self.ssl_context.load_cert_chain(certfile=certfile)
def __init__ ( self , host , port , socket_family = socket . AF_INET , client_timeout = 3000 , backlog = 128 , ssl_context = None , certfile = 'cert.pem' , ciphers = RESTRICTED_SERVER_CIPHERS ) : super ( TSSLServerSocket , self ) . __init__ ( host = host , port = port , socket_family = socket_family , client_timeout = client_timeout , backlog = backlog ) if ssl_context : self . ssl_context = ssl_context else : if not os . access ( certfile , os . R_OK ) : raise IOError ( 'No such certfile found: %s' % certfile ) self . ssl_context = create_thriftpy_context ( server_side = True , ciphers = ciphers ) self . ssl_context . load_cert_chain ( certfile = certfile )