Current location - Education and Training Encyclopedia - Graduation thesis - I just bought a sharp803T mobile phone CD. It's not good to update the game with QQ, so I can't get online. It says TCP connection error.
I just bought a sharp803T mobile phone CD. It's not good to update the game with QQ, so I can't get online. It says TCP connection error.
There are two common solutions to TCP disconnection:

Scheme 1: Extend the time for the firewall to terminate the inactive TCP connection. For example, for the above situation, you can adjust the firewall settings and set the time longer than 2 hours set by the server.

Scheme 2, shorten the keep-alive time of server-side TCP connection. The purpose of shortening this time is to send a keep-alive detection message before the firewall terminates the connection, which can not only detect the client state, but also make the connection active.

For the first scheme, extending the holding time of TCP connection may lead to the performance degradation of firewall, especially when maintaining a large number of connections that have been inactive for a long time; For the second scheme, if the keep-alive time of the server-side TCP connection is shortened, it means that the number of packets in the network will increase and the extra network bandwidth will be occupied. Therefore, the two schemes have their own advantages and disadvantages and need to be selected according to different practical applications.