Maybe I haven't fully woken up, but I'm going through Beej's network programming guide on datagram sockets
https://beej.us/guide/bgnet/html/multi/clientserver.html#simpleserver
and I'm confused by an initial piece in the client side. No command line arguments are specified in the demonstration, however, it looks like there are multiple calls in the code to check for the argument count. For instance, in the first if statement there's a check for the count to be 3, if not the program exits.
if (argc != 3) {
fprintf(stderr,"usage: talker hostname message\n");
exit(1);
}
Could someone explain what's going on here?
Thanks for any help in advance.