#NEWLINE# def __init__( self , session , websocket_url , io_loop = None ) : #NEWLINE# #INDENT# '\n          Opens a websocket connection to the server.\n        ' #NEWLINE# self . _url = websocket_url #NEWLINE# self . _session = session #NEWLINE# self . _protocol = Protocol ( '1.0' ) #NEWLINE# self . _receiver = Receiver ( session . _protocol ) #NEWLINE# self . _socket = None #NEWLINE# self . _state = self . NOT_YET_CONNECTED ( ) #NEWLINE# if ( io_loop is None ) : #NEWLINE# #INDENT# io_loop = IOLoop ( ) #NEWLINE# #UNINDENT# self . _loop = io_loop #NEWLINE# self . _until_predicate = None #NEWLINE# self . _protocol = Protocol ( '1.0' ) #NEWLINE# self . _server_info = None