I\'m writing a simple client/server network application that sends and receives fixed size messages through a TCP socket.
So far, I\'ve been using the <
The simple loop is the way to go. Given the very small number of bytes you're exchanging, I guess it will need just one iteration to read everything, but if you want to make it correct, you have to loop.