I am trying to stream a lot of videos on a peer to peer connection using TCP stream(via winsock2) on windows.
The connection is 10Gbs copper.
I need to stream about 2Gbs. I am able to get the throughput but occassionally there is a 200 or 300ms stall.
The stall occurs around send for the server and around recv for the client.
Digging a bit more I read about the Nagle algorithm and quickack implemented by default. I have tried to change the configurations in many ways... But there always seem to occassionally a non "flat line" communication. So there are spikes of around 200 ms.
Should I stream video in UDP? Are such spikes inherent to TCP Stream? I can smooth the spikes with a buffer but I would pay with latency.
Or is thete a setup where TCP ack or algorithm wont stall at all?