In analysis
First pass,
send will return 1
sent = 1
Second pass
send will return 2
sent = 3
I guess what is the array buff[] being sent in the first pass, if at all, if it is two bytes we are good to go with this and I just made this more complicated than it should have been.