1. A method of maintaining an IP connection between a mobile terminal and a network node over a network, comprising: detecting a rate with which the client-slide request are made from the mobile terminal; dynamically adjusting time intervals between the keep-alive messages sent to the mobile terminal based on the rate with which the client-side requests are made; sending, by the network node, keep-alive messages to the mobile terminal in an absence of network traffic through the IP connection between the mobile terminal and the network node; further optimizing the time intervals between the keep-alive messages based on a cost to send the keep-alive messages in the network.