networking · beginner · ~15 min
Bound a listen() backlog argument.
Implement int clamp_backlog(int requested, int max) returning requested capped at max, and at least 0.
int clamp_backlog(int requested, int max) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.