networking · beginner · ~15 min
Track progress through a partial-send loop.
send may transmit only part of the buffer. Implement int bytes_remaining(int total, int sent) returning how many bytes are still unsent (total - sent, never negative).
int bytes_remaining(int total, int sent) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.