Originally Posted by KungPoo
With this being a small project, wouldn't a connection-less (UDP) protocol be better, for speed and for the sake of just completing the project?
I know TCP is more connection-oriented- verifying packets, but with such a small project and application, I shouldn't be too worried about packet loss, correct?
I wouldn't decide which to use based on "for the sake of just completing the project." Which you use would depend upon the requirements of your app. This is part of the learning process to determine your requirements and make design decisions on how to implement those requirements.
You have a very basic list of requirements right in your post although they are not worded as such. Let's just reword those as more proper type requirements:
REQ01 - Server SHALL listen on a specific port
REQ02 - Server SHALL allow multiple clients to connect
REQ03 - Client App SHALL connect to server and interpret commands from the user to the server, vice versa
REQ04 - Client App SHALL ask user for upper and lower number from the guessing range
REQ05 - Client App SHALL then ask user for their guess and if too low or too high, the client will let the user know.
REQ06 - If the user guesses correctly, it SHALL tell the user they are correct, tell them how many guesses they took, then start the game over.
Now look at each requirement and look at both TCP and UDP and determine if you can implement that requirement using each one. If you can't implement any one of those requirements with one of the protocols then that one should not be selected.