Long polling with NSURLConnection

前端 未结 5 1456
天涯浪人
天涯浪人 2020-12-31 06:46

I\'m working on an iPhone application which will use long-polling to send event notifications from the server to the client over HTTP. After opening a connection on the ser

5条回答
  •  死守一世寂寞
    2020-12-31 07:22

    It sounds as if you need to flush the socket on the server-side, although it's really difficult to say for sure. If you can't easily change the server to do that, then it may help to sniff the network connection to see when stuff is actually getting sent from the server.

    You can use a tool like Wireshark to sniff your network.

    Another option for seeing what's getting sent/received to/from the phone is described in the following article:

    http://blog.jerodsanto.net/2009/06/sniff-your-iphones-network-traffic/

    Good luck!

提交回复
热议问题