开发者

How to do long polling from iPhone application?

开发者 https://www.devze.com 2022-12-26 00:11 出处:网络
I want to create a iPhone chat application and i do not have any experience of socket programming so can u please help me understand How can i do long polling from iPhone application?

I want to create a iPhone chat application and i do not have any experience of socket programming so can u please help me understand How can i do long polling from iPhone application?

Also can NSURLConnection be used for this purpose or we need to use some low level API?

Are there any 开发者_如何学编程libraries available for the same?


Check out CocoaAsyncSocket.


Long polling is for languages like javascript that cannot open persistent connections. You can still do long polling with something like NSURLConnection, but you would be much better served by CFStreamCreatePairWithSocketToHost or similar to open a full bidirectional socket.

Long polling is basically a hack that has become a buzzword.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号