determine socket connection state - android

后端 未结 1 1790
我在风中等你
我在风中等你 2021-01-28 16:33

I have an application that uses sockets to connect to my server. A lot of times the application lies \"dormant\" when it doesn\'t need to send info back and forth to the server

相关标签:
1条回答
  • 2021-01-28 17:35

    Are you using a Service to handle this Socket connection to your server (it would probably be a good idea). If/when you are, you can create the "ping" method as a thread in your service.

    0 讨论(0)
提交回复
热议问题