networking · intermediate · ~15 min
Track a high-water mark.
With the same ops, implement int peak_connections(const char *ops) returning the maximum number of simultaneous connections reached.
int peak_connections(const char *ops) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.