def METHOD_NAME(self):
    """Read from the stream until the token (\x1a) was received."""
    data = bytes()
    while True:
        chunk = self.sock.recv(self.bufferSize)
        data += chunk
        if bytes(OpenOcd.COMMAND_TOKEN, encoding="utf-8") in chunk:
            break
    if self.verbose:
        print("-> ", data)
    data = data.decode("utf-8").strip()
    data = data[:-1] # strip trailing \x1a
    return data