Reputation:
in C, I have to send a bunch of datas with tcp/ip (~6.5mo) I'm using the "classic" send(). Do you think it's a good idea to give to the function the whole size of data to send in one part or should I prefer the chunk way (slices of, for example, 64ko...)
Upvotes: 1
Views: 286
Reputation: 137442
Give it the full size, and just call it again with the rest of the buffer (according to the return value).
You deal with your logic, let the OS deal with the send logic.
Upvotes: 5