Optimizing throughput over wireless links and MANETs under delay constraints