networking · beginner · ~15 min
Map socket type to reliability.
Implement int is_reliable(int socktype) returning 1 for SOCK_STREAM (TCP, reliable ordered delivery), else 0.
#include <sys/socket.h>
int is_reliable(int socktype) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.