I am trying to开发者_JAVA百科 implement resume functionality while using NSURLConnection. I read URL Loading System Programming Guide provided by apple but they didn't have the info. Thank you very much for your help.
There is no such functionality. But you can create your own resume function. You'll need to add byte-range header. To achieve that you need to know file size and downloaded part size. And of course server must accept byte-range requests, otherwise its useless. Here is a sample of adding range header:
[request setValue:@"12345-99999" forHTTPHeaderField:@"Range"];
12345 - downloaded part size + 1 byte
99999 - total file size
精彩评论