Is there a way to pause/resume particular TCP connection?
I'm playing online game that matches me against random players. I found out that when I unplug my Ethernet cable, I have a minute to decide do I want this match to count.
If things go wrong, I just restart the game and start over. If things go the way I planned, I plug the cable back in and continue.
The problem is, more often than not I need two minutes to make up my mind, but the game disconnects me after 60 seconds (I get "Connection lost" error)
The question is, how can I prevent a connection from timing out?
I assume that if I let keep-alive packets go through, but pause actual data packets, I will be able to pause and resume tcp connection on demand, but I'm not sure if it is possible with a common firewall software like iptables or ipfw, or I should go with the MITM?
The game uses SSL encryption over a standard TCP socket.
Solution 1:
The timeout is almost certainly on receiving the actual data the server is waiting for, not on the TCP connection. This is how timeouts are typically implemented. There are no TCP timeouts that are in the 60 second range, so this is almost certainly not a TCP timeout and can't be changed by manipulations at the TCP level.
Solution 2:
No.
Once a TCP connection is closed, it cannot be resumed, at the network level. The application must support a resume feature, which retains state over a new TCP connection.
You could submit a feature request to the developers of the game you're playing. Be sure to explain that you want a feature that makes it easier for you to cheat.