If send() doesn't send all your data then you are not supposed to resend everything.
You are supposed to keep sending until all your data is transmitted.
Meaning after a part of your data was sent, send the data from the offset that send has returned.
Kurt