Hi,
the question isn't completely amateur-ish. Moreover, even if it would be, it's somewhat well explained, and we all have to start from somewhere, ins't it ?
Being newbies isn't a problem (it's a problem when one shouldn't be anymore a newbie and still is).
Anyway, as you may have noticed TCP is a stream protocol. This means that it's not guaranteed that the data the application is sending will be sent with one packet only, and that the receiver will receive one packet with the whole content that the sender has sent. The receiver could need several read to get what the sender did send with one send. There's too many "send" in the previous sentence, but I hope it does make sense.
If the previous sentence makes sense, then you'll understand the following: you need a data format. Typically applications using TCP use a L7 data format, so the receiver knows how many bytes it should read to process a message.
As an example, a HTTP message contains the message length (somewhere). In this way the receiver knows that it must keep reading 'til it decodes the length field, and then it knows how many [more] bytes it must read.
As for your goal, I'd suggest to use a simpler strategy. A common format is the TLV (Type, Length, Value), e.g., one byte to code the message type (echo request, echo reply), one byte for the length and n bytes for the message. If you want to have a message larger than 255 bytes, have a larger length field.
Another good idea is to add a sequence number and a timestamp, much like UDP echo.
Hope this helps,
T.