You should be aware that unlike UDP, TCP is a stream-based protocol, packets are a higher-level abstraction of the application layer.
The library you're using for the TCP client (which one?) may provide stream functionality that allows to read one or multiple bytes in a blocking way. That is, the read function only returns when data is available. With that, you can then read the header (known number of bytes), and after that make another read call with the number of bytes specified by the header. For example, with Java Sockets this is quite simple to achieve.