TCP server and client problemd | Telit Cinterion IoT Developer Community
June 25, 2015 - 12:05am, 1743 views
I am facing two main critical problems :
1) How I can keepalive the TCP server ?
Because ,sometimes the network disconnect the server without sending any response .
I know that from opening a TCP server listennning for a day and try to ping to it from pc then timeout received alalthough all services and all at commands ensures that this server service is running but it is not true.
2) Sometimes client channel cannot connect to a remote server althogh it makes a fast successfully connect if this remote server tries to ping to it.
My modem is 2G modem.
I hope I could find a solution for my issues
Hello,
Please share some more information, write what module you are using. Do you use AT commands or Java?
For example in Java there's BearerControlListener interface which can inform the application about the bearer state changes so you can for example know when the network disconnects the GPRS which can happen for example when the data connection is idle for some time.
To make sure the remote connection will be possible to your server I think you could also implement on the module some periodic connections to your server or PINGs using the public address of the module.
Regards,
Bartłomiej