I have a strange TCP socket occurrence that I simply don't know how to solve.
- I send a simple Http request to camera that it should stream meta data.
- Camera sends a Http header reply and then it starts sending data in chunked mode (it never ends).
The strange thing is that it takes around 7 minutes until the program receives any notification that there is data available. From then on it as it looks it works properly.
Now I'm monitoring the data stream through Wireshark and data is coming properly without any delay.
I've tried with Qt 5.1 and Boost 1.55 and it's the same behavior, so I assume that Windows is doing some kind of buffering. I've also set m_Socket_pStream->setSocketOption( QAbstractSocket::LowDelayOption, 1 ) in Qt and there is no difference whatsoever.
Now the problem is that I need the data in realtime (well +-0.5sec) and not after 7 minutes.
Has anybody experience anything like this?
Best regards Waldemar
After some more searching and digging I found the explanation.
So it's really clear now. As this is a Http stream it's part of antivirus verification. Now after some time/'probably size' antivirus gives up waiting for the end of the stream (as there aren't many 10MB viruses out there) and it forwards the packets on.
Hopefully this helps somebody.
Br Waldemar