Any decent book on socket programming will tell you that you can't predict the size of any one packet.
If you want to send 1024 bytes the software stack may accept it in one call, or make you send it as 256, 768 or as 1000, 24, or . . .
For both sending and receiving you generally need to loop and send / get as much as the software stack accepts / provides until you're done.
As AntiEverything noted it's up to the protocol layered on top of TCP, like HTTP or FTP or POP3, to determine when you are done with a message.