def METHOD_NAME(self):
    cmdret = None
    data = ""
    max_tries = 20
    for _ in range(max_tries):
        received = self.s.recv(1024).decode("iso-8859-1")
        if not received:
            break
        data += received
        if data.endswith("\n"):
            cmdret = json.loads(data)
            break
        time.sleep(1)
    return cmdret