Rewrite of the recv loop, removing makefile().