4 ms·
I'd start with the question of 'why so much ACKing?'. In TCP you don't normally ACK every packet. You really only need one ACK per receive window, not one ACK p
by mbell 12y ago
I'd start with the question of 'why so much ACKing?'. In TCP you don't normally ACK every packet. You really only need one ACK per receive window, not one ACK per packet which is what the op's code appears to be trying to do. It also doesn't look like op's code is setting the window size anywhere so in effect she's saying to google's server 'ok got that one, send me a bunch more' and trying to do that for every packet at fast as possible is creating a runaway congestion problem.
The best solution doesn't have anything to do with python, it's to implement window size (flow control) and only ack when you need to.
ps - It's been several years since I've worked on a TCP stack so please correct anything I'm remembered incorrectly