Change `sendfile' to loop until everything has been sent.