1

It it important to rely on TCP guaranteed delivery even in case of mobile client which could disappear in a tunnel for a long time when TCP with standard settings give up and close the connection. Is it possible to make TCP implementation keep trying for up to 10-20 minutes? What settings should be done on linux and on mobile phones (android and iOS)? Thank you.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
user
  • 11
  • 1

2 Answers2

4

man tcp - look for tcp_retries[1,2] for Linux machines. I have no idea what to do for Android and given Apples attitude to system-level tweaking there is probably absolutely no way to do this on iOS except when you jailbreak.

TCP socket timeouts put aside, most applications will implement their own timeouts which are probably considerably shorter than the ones from the transport layer. Whether this is configurable at all clearly depends on the application in question - there is no system-wide parameter for it.

the-wabbit
  • 40,737
  • 13
  • 111
  • 174
4

It's not possible. The way to solve this problem is with a layer on top of the TCP layer that provides the semantics you need. This layer would have to add an identifier to each message, implement message acknowledgements, re-establish the TCP connection if it broken, and re-send all unacknowledged messages.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84