networking · intermediate · ~15 min
Recognise the in-progress connect status.
A non-blocking connect returns -1 with errno EINPROGRESS while the handshake runs. Implement int connect_in_progress(int err) returning 1 if err == EINPROGRESS, else 0.
#include <errno.h>
int connect_in_progress(int err) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.