Socket sometimes returns combined elements
I have an issue where on my mobile phone the socket sometimes doesn't give me separate frames from the stream of TCP messages. The problem doesn't happen on an Emulator on my PC but on my Android mobile phone. I wanted to check if the sender was at fault and checked the traffic with Wireshark and an Emulator. But there the issue never happened. On my phone, I installed the App NetCapture of the Play Store to analyze my traffic there, and then suddenly the issue just... disappeared. I think this is because the App channels all my phones traffic using the VPN functionality to log everything. Now what this probably does is extend the time between the messages which normally come shortly after each other which means the Dart Socket has enough time to feed the stream with the first message before the second gets appended to it.
Is this assumption correct? I know very little about TCP. Apparently, there are no set message boundaries in TCP but my Emulator is automatically sending back an ACK after the first message. I am not doing that in my code so this library should know where the bounds are just a Wireshark is able to show me that those messages after in fact intended to be separate.
Btw: The issues happened with both the forEach() and the listen() method.
Can anyone tell me if I am on the right track with my issue? Has this happened to anyone before or is there something inherently wrong with my assumptions?