Home > Mobile >  How to extend the China mobile connection to maintain long time
How to extend the China mobile connection to maintain long time

Time:10-01

FCM push always break line, check the log once every two minutes break, estimation is released gateway, China mobile's long how to extend the time a connection?

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
  • Related