5 * oserver - a demonstration module for LCA2011
7 * This code shows off the features of CCAN and various C cantrips.
12 * #include <sys/types.h>
13 * #include <sys/socket.h>
14 * #include <ccan/oserver/oserver.h>
22 * sockfd = oserver_setup();
24 * fd = accept(sockfd, NULL, NULL);
26 * err(1, "Accepting connection on TCP socket");
31 int main(int argc, char *argv[])
33 /* Expect exactly one argument */
37 if (strcmp(argv[1], "depends") == 0) {
38 printf("ccan/compiler\n");
39 printf("ccan/read_write_all\n");
41 printf("ccan/foreach\n");