Networking in C · advanced · ~10 min
Detect which loopback ports accept TCP connections.
A "scan" simply tries to connect() to each port. A successful connect means something is listening; a refused connect (ECONNREFUSED) means nothing is there.
Strictly local. Scanning third-party hosts without explicit, written authorisation is unauthorised access in many jurisdictions. The platform's exercises only ever target 127.0.0.1 against fixtures the harness opens itself.