(self, url,
                 on_open = None, on_message = None, on_error = None,
                 on_close = None, keep_running = True, get_mask_key = None)
url: websocket url.
        on_open: callable object which is called at opening websocket.
          this function has one argument. The arugment is this class object.
        on_message: callbale object which is called when recieved data.
         on_message has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is utf-8 string which we get from the server.
       on_error: callable object which is called when we get error.
         on_error has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is exception object.
       on_close: callable object which is called when closed the connection.
         this function has one argument. The arugment is this class object.
       keep_running: a boolean flag indicating whether the app's main loop should
         keep running, defaults to True
       get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
         docstring for more information
url: websocket url.
        on_open: callable object which is called at opening websocket.
          this function has one argument. The arugment is this class object.
        on_message: callbale object which is called when recieved data.
         on_message has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is utf-8 string which we get from the server.
       on_error: callable object which is called when we get error.
         on_error has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is exception object.
       on_close: callable object which is called when closed the connection.
         this function has one argument. The arugment is this class object.
       keep_running: a boolean flag indicating whether the app's main loop should
         keep running, defaults to True
       get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
         docstring for more information
url : websocket url . on_open : callable object which is called at opening websocket . this function has one argument . The arugment is this class object . on_message : callbale object which is called when recieved data . on_message has 2 arguments . The 1st arugment is this class object . The passing 2nd arugment is utf - 8 string which we get from the server . on_error : callable object which is called when we get error . on_error has 2 arguments . The 1st arugment is this class object . The passing 2nd arugment is exception object . on_close : callable object which is called when closed the connection . this function has one argument . The arugment is this class object . keep_running : a boolean flag indicating whether the app s main loop should keep running defaults to True get_mask_key : a callable to produce new mask keys see the WebSocket . set_mask_key s docstring for more information
def __init__(self, url,
                 on_open = None, on_message = None, on_error = None,
                 on_close = None, keep_running = True, get_mask_key = None):
        """
        url: websocket url.
        on_open: callable object which is called at opening websocket.
          this function has one argument. The arugment is this class object.
        on_message: callbale object which is called when recieved data.
         on_message has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is utf-8 string which we get from the server.
       on_error: callable object which is called when we get error.
         on_error has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is exception object.
       on_close: callable object which is called when closed the connection.
         this function has one argument. The arugment is this class object.
       keep_running: a boolean flag indicating whether the app's main loop should
         keep running, defaults to True
       get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
         docstring for more information
        """
        self.url = url
        self.on_open = on_open
        self.on_message = on_message
        self.on_error = on_error
        self.on_close = on_close
        self.keep_running = keep_running
        self.get_mask_key = get_mask_key
        self.sock = None
def __init__ ( self , url , on_open = None , on_message = None , on_error = None , on_close = None , keep_running = True , get_mask_key = None ) : self . url = url self . on_open = on_open self . on_message = on_message self . on_error = on_error self . on_close = on_close self . keep_running = keep_running self . get_mask_key = get_mask_key self . sock = None