code: def _register(self):
          
          logger.debug('register on %s', "ws://{}:{}".format(self.ip, self.port));
          try:
              websocket = yield from websockets.connect(
                  "ws://{}:{}".format(self.ip, self.port), timeout=self.timeout_connect)
  
          except:
              logger.error('register failed to connect to %s', "ws://{}:{}".format(self.ip, self.port));
              return False
  
          logger.debug('register websocket connected to %s', "ws://{}:{}".format(self.ip, self.port));
  
          try:
              yield from self._send_register_payload(websocket)
  
          finally:
              logger.debug('close register connection to %s', "ws://{}:{}".format(self.ip, self.port));
              yield from websocket.close()
docs: Register wrapper.