A poor implementation of recv