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

           from ws4py.client.threadedclient import WebSocketClient

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

               def closed(self, code, reason):
                  print(("Closed down", code, reason))

               def received_message(self, m):
                  print("=> %d %s" % (len(m), str(m)))

           try:
               ws = EchoClient('ws://localhost:9000/echo', protocols=['http-only', 'chat'])
               ws.connect()
           except KeyboardInterrupt:
              ws.close()
.. code-block:: python
.. code - block :: python
def __init__(self, url, protocols=None, extensions=None, heartbeat_freq=None):
        """
        .. code-block:: python

           from ws4py.client.threadedclient import WebSocketClient

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

               def closed(self, code, reason):
                  print(("Closed down", code, reason))

               def received_message(self, m):
                  print("=> %d %s" % (len(m), str(m)))

           try:
               ws = EchoClient('ws://localhost:9000/echo', protocols=['http-only', 'chat'])
               ws.connect()
           except KeyboardInterrupt:
              ws.close()

        """
        WebSocketBaseClient.__init__(self, url, protocols, extensions, heartbeat_freq)
        self._th = threading.Thread(target=self.run, name='WebSocketClient')
        self._th.daemon = True
def __init__ ( self , url , protocols = None , extensions = None , heartbeat_freq = None ) : WebSocketBaseClient . __init__ ( self , url , protocols , extensions , heartbeat_freq ) self . _th = threading . Thread ( target = self . run , name = 'WebSocketClient' ) self . _th . daemon = True