#NEWLINE# def __init__( self , host = 'localhost' , port = 5672 , ssl = None , connect_timeout = None , userid = 'guest' , password = 'guest' , login_method = 'AMQPLAIN' , virtual_host = '/' , locale = 'en_US' , channel_max = 65535 , frame_max = 131072 , heartbeat = 0 , client_properties = None , on_blocked = None , on_unblocked = None ) : #NEWLINE# #INDENT# 'Create a connection to the specified host\n\n        If you are using SSL, make sure the correct port number is specified (usually 5671), as the\n        default of 5672 is for non-SSL connections.\n\n        :param str host: host\n        :param int port: port\n        :param ssl: dict of SSL options passed to :func:`ssl.wrap_socket()`, None to disable SSL\n        :param float connect_timeout: connect timeout\n        :param str userid: username\n        :param str password: password\n        :param str login_method: login method (this is server-specific); default is for RabbitMQ\n        :param str virtual_host: virtual host\n        :param str locale: locale\n        :param int channel_max: maximum number of channels\n        :param int frame_max: maximum frame payload size in bytes\n        :param float heartbeat: heartbeat interval in seconds, 0 disables heartbeat\n        :param client_properties: dict of client properties\n        :param on_blocked: callback on connection blocked\n        :param on_unblocked: callback on connection unblocked\n        :type connect_timeout: float or None\n        :type client_properties: dict or None\n        :type ssl: dict or None\n        :type on_blocked: Callable or None\n        :type on_unblocked: Callable or None\n        ' #NEWLINE# log . debug ( 'amqpy {} Connection.__init__()' . format ( __version__ ) ) #NEWLINE# self . channels = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# super ( Connection , self ) . __init__ ( self , 0 ) #NEWLINE# self . transport = None #NEWLINE# self . method_reader = None #NEWLINE# self . method_writer = None #NEWLINE# self . _wait_tune_ok = None #NEWLINE# self . version_major = 0 #NEWLINE# self . version_minor = 0 #NEWLINE# self . server_properties = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . mechanisms = [ ] #NEWLINE# self . locales = [ ] #NEWLINE# self . channel_max = channel_max #NEWLINE# self . frame_max = frame_max #NEWLINE# if six . PY2 : #NEWLINE# #INDENT# self . _avail_channel_ids = array ( b'H' , range ( self . channel_max , 0 , ( - 1 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _avail_channel_ids = array ( 'H' , range ( self . channel_max , 0 , ( - 1 ) ) ) #NEWLINE# #UNINDENT# self . _heartbeat_final = 0 #NEWLINE# self . _heartbeat_server = None #NEWLINE# self . _host = host #NEWLINE# self . _port = port #NEWLINE# self . _connect_timeout = connect_timeout #NEWLINE# self . _ssl = ssl #NEWLINE# self . _userid = userid #NEWLINE# self . _password = password #NEWLINE# self . _login_method = login_method #NEWLINE# self . _virtual_host = virtual_host #NEWLINE# self . _locale = locale #NEWLINE# self . _heartbeat_client = heartbeat #NEWLINE# self . _client_properties = client_properties #NEWLINE# self . on_blocked = on_blocked #NEWLINE# self . on_unblocked = on_unblocked #NEWLINE# self . _close_event = Event ( ) #NEWLINE# self . _heartbeat_thread = None #NEWLINE# self . connect ( )