I have a server than is a \"command handler\" process. It receives messages over UDP, and delegates the work to do to a different process by communicating to that process throu
You should be testing for the error return, something like
if((nsfd = socket (AF_INET, SOCK_DGRAM, IPROTO_UDP)) < 0} { perror("at socket open"); // I'd call exit here, probably } if(sendto(nsfd, buff, bread, 0, &addr, sizeof(addr) < 0){ perror("At sendto"); }
There's a nice tutorial example here.