ios - ASIHttpRequest request:didReceiveBytes: not working as expected -


i'm sure there's easy explanation this, i'm tearing hair out on matter.

    -(void)addrequestwithurl:(nsurl *)url savepath:(nsstring *)path     {       asihttprequest *request = [asihttprequest requestwithurl:url];       request.userinfo = [[nsmutabledictionary alloc] initwithobjectsandkeys:path, @"savepath", nil];       networkqueue.showaccurateprogress = yes;       [self.networkqueue addoperation:request];       [self.networkqueue setdownloadprogressdelegate:self];     }      -(void)request:(asihttprequest *)request didreceivebytes:(long long)bytes     {        dlog(@"bytes: %llu", bytes);     } 

didreceivebytes not ever called. if set download progress delegate each request instead of queue didreceivebytes method called, after each request finished, , value of 1.

any suggestions what's wrong here? (working on ios btw)

yeah took me while figure 1 out, got same result until started asihttprequest code. have add:

request.showaccurateprogress = yes; 

before networkqueue.showaccurateprogress = yes; because otherwise not read individual head info of each file , add bytes.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -