CodePudding user response:
Said something I didn't contact with you, but the company hardware need to use a sim card, and it takes long connected to and the background communication,According to hardware colleagues, if long time no communication, TCP connection is to be kicked off, specific how long don't know,
Their approach is per minute, and sends a heartbeat to the background, coupled with bolt reconnection (implementation), no problems in practical use
CodePudding user response:
Android development there is a project with long link, the service side length is realized by using netty through TCP connection, if severed automatically reconnection