I ended up doing a lot of clean up on this pull request. There were getting to be some pretty nasty nested if clauses so I tried to move as much as I could into functions. I also think we're going to have to shift the flow of the program from what had initially thought would work. I'll communicate those thoughts somewhere else.
Client has a TCP and a UDP socket.
Client and server function declarations in header files.
Removed packet fields data structure setup from client and server.
checkCommandLineArguments() is a function that moves the logic for checking command line arguments into a function. It is located in network node.
Valid commands are now stored in an array.
Logic for getting user input is now in the getUserInput() function
shutdownClient() closes both the UDP and TCP sockets
Checking a string to see if its a valid command is now a function. checkForValidCommand().
Added a function in client to send a UDP message. This should be moved to network node so the server can use it as well.
Logic for executing a put or get command are now contained in functions in the client.
Changed networkNodeConnect() to not use the addrinfo data structure. The way it's doing it now is a little more old fashioned but in my opinion, a little simpler.
Added a function, checkStringForCommand(), to network node. It checks to see if a string is a command.
Added a function, printReceivedMessage(), to network node. It prints out a received message.
Added some addition define statements to network node.
Server now has 3 initial sockets. Listening TCP and UDP. Connected TCP.
Added a function, handleErrorNonBlocking(), to server. It checks the return from reading a socket, checks for errors, and ignores them if it's related to no queued data.
I ended up doing a lot of clean up on this pull request. There were getting to be some pretty nasty nested if clauses so I tried to move as much as I could into functions. I also think we're going to have to shift the flow of the program from what had initially thought would work. I'll communicate those thoughts somewhere else.