(self, url, protocols=None, extensions=None, io_loop=None)
.. code-block:: python

            from tornado import ioloop

            class MyClient(TornadoWebSocketClient):
                def opened(self):
                    for i in range(0, 200, 25):
                        self.send("*" * i)

                def received_message(self, m):
                    print((m, len(str(m))))

                def closed(self, code, reason=None):
                    ioloop.IOLoop.instance().stop()

            ws = MyClient('ws://localhost:9000/echo', protocols=['http-only', 'chat'])
            ws.connect()

            ioloop.IOLoop.instance().start()
.. code-block:: python
.. code - block :: python
def __init__(self, url, protocols=None, extensions=None, io_loop=None):
        """
        .. code-block:: python

            from tornado import ioloop

            class MyClient(TornadoWebSocketClient):
                def opened(self):
                    for i in range(0, 200, 25):
                        self.send("*" * i)

                def received_message(self, m):
                    print((m, len(str(m))))

                def closed(self, code, reason=None):
                    ioloop.IOLoop.instance().stop()

            ws = MyClient('ws://localhost:9000/echo', protocols=['http-only', 'chat'])
            ws.connect()

            ioloop.IOLoop.instance().start()
        """
        WebSocketBaseClient.__init__(self, url, protocols, extensions)
        if self.scheme == "wss":
            self.sock = ssl.wrap_socket(self.sock,
                    do_handshake_on_connect=False)
            self.io = iostream.SSLIOStream(self.sock, io_loop)
        else:
            self.io = iostream.IOStream(self.sock, io_loop)
        self.io_loop = io_loop
def __init__ ( self , url , protocols = None , extensions = None , io_loop = None ) : WebSocketBaseClient . __init__ ( self , url , protocols , extensions ) if self . scheme == "wss" : self . sock = ssl . wrap_socket ( self . sock , do_handshake_on_connect = False ) self . io = iostream . SSLIOStream ( self . sock , io_loop ) else : self . io = iostream . IOStream ( self . sock , io_loop ) self . io_loop = io_loop