#NEWLINE# def __init__( self , host , port , app , handler = None , passthrough_errors = False , ssl_context = None , fd = None ) : #NEWLINE# #INDENT# if ( handler is None ) : #NEWLINE# #INDENT# handler = WSGIRequestHandler #NEWLINE# #UNINDENT# self . address_family = select_ip_version ( host , port ) #NEWLINE# if ( fd is not None ) : #NEWLINE# #INDENT# real_sock = socket . fromfd ( fd , self . address_family , socket . SOCK_STREAM ) #NEWLINE# port = 0 #NEWLINE# #UNINDENT# HTTPServer . __init__ ( self , ( host , int ( port ) ) , handler ) #NEWLINE# self . app = app #NEWLINE# self . passthrough_errors = passthrough_errors #NEWLINE# self . shutdown_signal = False #NEWLINE# self . host = host #NEWLINE# self . port = port #NEWLINE# if ( fd is not None ) : #NEWLINE# #INDENT# self . socket . close ( ) #NEWLINE# self . socket = real_sock #NEWLINE# self . server_address = self . socket . getsockname ( ) #NEWLINE# #UNINDENT# if ( ssl_context is not None ) : #NEWLINE# #INDENT# if isinstance ( ssl_context , tuple ) : #NEWLINE# #INDENT# ssl_context = load_ssl_context ( * ssl_context ) #NEWLINE# #UNINDENT# if ( ssl_context == 'adhoc' ) : #NEWLINE# #INDENT# ssl_context = generate_adhoc_ssl_context ( ) #NEWLINE# #UNINDENT# self . socket = ssl_context . wrap_socket ( real_sock . socket , server_side = True ) #NEWLINE# self . ssl_context = ssl_context #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . ssl_context = None