 <p>TCP has no concept of packets. A TCP stream is a continuous stream of bytes - if you want a structure within that stream of bytes, you have to impose it yourself, by implementing some kind of framing mechanism. A simple one is the "length prefix" - when sending an application-level frame, you first send the length of the frame, then the data.</p>