I have an iPhone application that needs to be updated as soon as a change is made to the server. How can I have the server "push" data to the iphone rather than the iphone constantly polling the web service?
EDIT: I want th iPhone to receive JSON updates as soon as the server processes them, without having to request.
I suppose since the server is a web service that this is called Comet, but I haven't seen a good iPhone example yet. I would think really seriously about whether you need to do this. Maintaining an open connection to your server to receive updates in real time--and thus keeping the radios on the phone constantly active--will suck down power like crazy.
以上就是Avoid iPhone constant polling a web-service?的详细内容,更多请关注web前端其它相关文章!