[英]Persistent HTTPS Connections Objective-C iOS Cocoa
What's the best way to make persistent HTTPS connections in Objective-C with Cocoa Framework for iPhone with NSURLSession? 使用Cocoa Framework for iPhone和NSURLSession在Objective-C中建立持久HTTPS连接的最佳方法是什么? I've read somewhere else that persistent connections are standard since HTTP 1.1.
我在其他地方读到,自HTTP 1.1以来,持久连接是标准的。 Some code example would be very appreciated.
一些代码示例将不胜感激。 I need to achieve a simple data retrieval task (json encoded string)
我需要完成一个简单的数据检索任务(json编码的字符串)
best regards stefan 最好的问候斯蒂芬
Follow this link http://www.objc.io/issue-5/from-nsurlconnection-to-nsurlsession.html to find out, what "no persistent" means to understand "persistent". 通过此链接http://www.objc.io/issue-5/from-nsurlconnection-to-nsurlsession.html可以找出“没有持久性”意味着理解“持久性”的含义。
I haven't used NSURLConnection or NSURLSession myself, but persistent is not a special setting. 我自己没有使用过NSURLConnection或NSURLSession,但是持久化并不是一个特殊的设置。 It means, that the same settings-data is used for connection/session.
这意味着,相同的设置数据用于连接/会话。
Nothing about NSURLSession... 与NSURLSession无关...
But I've found a tutorial here http://www.raywenderlich.com/51127/nsurlsession-tutorial . 但我在http://www.raywenderlich.com/51127/nsurlsession-tutorial找到了一个教程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.