To achieve the continuation of the breakpoint, when the pause to cancel the connection connection,
To start the download, send a header message to the server, telling him how long it will take to request the data, and where to start
//Pause if(Sender. Selected) { [ Self. ConnCancel];//Cancel Connection Self. Conn=Nil;//Start}Else{//Create URL Nsurl*url = [Nsurlurlwithstring:@"Http://localhost:8080/TFServer/resources/videos/minion_01.mp4"];//Create request It's not nsurlrequest .Nsmutableurlrequest *request = [Nsmutableurlrequest Requestwithurl:url];//Create header information NSString*range = [NSStringstringwithformat:@"bytes=%lld-", Self. Filelength];//Set Header information[Request Setvalue:range forhttpheaderfield:@"Range"];//Send an asynchronous request Self. Conn= [nsurlconnectionConnectionwithrequest:request Delegate: Self]; }
"iOS Dev-Network" Large file breakpoint continuation (breakpoint download)