Hitesh Manchanda
Hitesh Manchanda

Reputation: 490

How to 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?

Upvotes: 1

Views: 1634

Answers (2)

drawnonward
drawnonward

Reputation: 53669

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.

Upvotes: 2

Shaggy Frog
Shaggy Frog

Reputation: 27601

Check out CocoaAsyncSocket.

Upvotes: 2

Related Questions