Android - Sockets vs Polling

前端 未结 3 401
暗喜
暗喜 2021-01-13 04:29

As part of an Android app I\'m developing there is a chat room feature. We have a server which can process the incoming messages and store the messages. Is it better to keep

3条回答
  •  抹茶落季
    2021-01-13 04:52

    It is bad solution with poll for app that have randomly posting data. What I want to say is that polling data is useful when you have something that is happening discrete like every 5 minutes or something like that. this is not the case with chat, some user can post something ones in a hour , some can post 30 times in 2 minutes

    so keep your sockets open

提交回复
热议问题