It might be that the data does not end with a newline, you must use /sockread -f %temptext in that case.