Keep TCP connection on forever
Posted: Thu Apr 07, 2016 3:29 am
I am able to establish a TCP connection as a client to a remote server using the SMING framework. The code for initiating client connection to server is simple.
Unfortunately, the connection will close after idling for some time. I would like to keep this connection open forever permanently. How can this be done?
Code: Select all
tcpClient.connect(SERVER_HOST, SERVER_PORT);
Unfortunately, the connection will close after idling for some time. I would like to keep this connection open forever permanently. How can this be done?