You should really always use binvars when reading from a socket. So it wouldn't be an ugly solution, it would be a correct solution.