code: def connect(self, url):
          
  
          headers = httputil.HTTPHeaders({'Content-Type': APPLICATION_JSON})
          request = httpclient.HTTPRequest(url=url,
                                           connect_timeout=self.connect_timeout,
                                           request_timeout=self.request_timeout,
                                           headers=headers)
          ws = websocket_connect(url)
          ws.add_done_callback(self._connect_callback)
docs: Connect to the server.
          :param str url: server URL.