I don't see any problems with the code you sent to extract the message to a string, so I assume something else is happening.
TCP is not required to send all the data you queue at a time. This means that he can send as much as he wants at a time, and he can choose to split your data into pieces at his discretion. In particular, it guarantees the ability to split your data if it does not fit into one package. Typically, the maximum packet size (aka MTU) is 1532 bytes of IIRC.
Therefore, there is a real possibility of sending data, but as several packets. The delay between receiving the first and second packets may mean that when the first arrives to your code, it happily reads everything that it contains, and then stops (no more data) before the second packet arrives.
You can test this hypothesis by observing network traffic or by letting your application pull more messages from Explorer and see if they finally receive all the data you sent (albeit to pieces).
Ultimately, the main problem is the TCP-based (thread-based) thread-based (rather than message-based) principle. even if you execute this code correctly, there is no guarantee that it will continue to work in the future , because it makes assumptions that TCP does not guarantee.
To be safe, you will need to include a message-based structure (for example, adding each piece of data with exactly 4 bytes that occupy its length, and then you can just keep reading forever until you get so many bytes).
source share