networking · beginner · ~15 min

Did we receive everything?

Check whether a recv got the full amount.

Challenge

Implement int recv_complete(int got, int want) returning 1 if got == want, else 0.

Starter code

int recv_complete(int got, int want) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.