I'm interested in TCP connection between mobile unit which is connected over GPRS to server on public network. I need to keep open, so I will send periodically keep-alive packets for hold session. Trouble is, that I must have a long-term period of sending keepalive packets for minimal data traffic, but I need to get to know that session is broken as fast as possible. How I tested on a few operators, NAT boxes don't send any information, such as TCP-RST or any ICMP message, that mapping is cancelled.

Could anyone advise me how could mobile unit get to know that session is broken?

Thank you very much

  • 1
    Wouldn't the lack of acknowledgement from your keep-alives be sufficient to indicate a problem? Of if you are sending keep-alives bidirectionally, the lack of receiving any keep-alives? – YLearn Aug 12 '15 at 2:20
  • Thank you for your answer. Your suggestions are reasonable, but in GPRS network it is important to save data and fast keep-alives are relatively costly. So acceptable is max keep-alive period about 10 minutes for keep open TCP session in operator's NAT, but I need to get to know that session is broken immediately. Is it possible to find out broken session without faster keepalives? – Martin Petřík Aug 12 '15 at 7:20
  • 1
    Do you really need to keep the TCP connection alive? Is it possible to start new TCP connection each time you have data to send – vladiz Oct 28 '15 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.