Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread jonat...@mugginsoft.com
On 19 Dec 2008, at 18:43, Jean-Nicolas Jolivet wrote: I am indeed using NNTP, but really I'm not even looking at cr+lf etc... Basically I'm sending the following command to retrieve a message: "ARTICLE \r\n" Then I'm reading all the data up until \r\n.\r\n is found (that is, a new l

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Jean-Nicolas Jolivet
Yup, someone already replied in private with that exact quote! Thanks a lot, this was exactly my problem! :) On 19-Dec-08, at 3:27 PM, Andrew Farmer wrote: On 19 Dec 08, at 10:24, Jean-Nicolas Jolivet wrote: Well after comparing the data that I am receiving with the data that I SHOULD

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Andrew Farmer
On 19 Dec 08, at 10:24, Jean-Nicolas Jolivet wrote: Well after comparing the data that I am receiving with the data that I SHOULD be receiving, it turns out that dots (yes, the dot character (.) ) are added all over the place in the data if I have 10 extra bytes, it means 10 extra dots

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Jean-Nicolas Jolivet
I am indeed using NNTP, but really I'm not even looking at cr+lf etc... Basically I'm sending the following command to retrieve a message: "ARTICLE \r\n" Then I'm reading all the data up until \r\n.\r\n is found (that is, a new line, a dot, and a new line again) which marks the end of an

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread glenn andreas
On Dec 19, 2008, at 12:24 PM, Jean-Nicolas Jolivet wrote: Well after comparing the data that I am receiving with the data that I SHOULD be receiving, it turns out that dots (yes, the dot character (.) ) are added all over the place in the data if I have 10 extra bytes, it means 10 ext

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Jean-Nicolas Jolivet
Well after comparing the data that I am receiving with the data that I SHOULD be receiving, it turns out that dots (yes, the dot character (.) ) are added all over the place in the data if I have 10 extra bytes, it means 10 extra dots were added to my data, so for example, a line that

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Jean-Nicolas Jolivet
I would love to give you an answer! The problem is that every newsreader out there that download binary files automatically decode and join the parts... I can't download just one part to test it against the part that my app downloaded!... I'm still trying to find another app that might be a

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Michael Ash
On Fri, Dec 19, 2008 at 11:43 AM, Jean-Nicolas Jolivet wrote: > Well after doing more tests... > > It happens even if I only have 1 active connection and it also happens > even if only download 1 part of the multiparts file (i.e. the part is still > slightly bigger than it should be) so basica

Re: NSData downloaded over socket is bigger than it should be...

2008-12-19 Thread Jean-Nicolas Jolivet
Well after doing more tests... It happens even if I only have 1 active connection and it also happens even if only download 1 part of the multiparts file (i.e. the part is still slightly bigger than it should be) so basically the files that were ending up ok with multiple connections ar

Re: NSData downloaded over socket is bigger than it should be...

2008-12-18 Thread Jean-Nicolas Jolivet
Hehe I understand, I didn't give much info ... the thing is, AsyncSocket works mostly with delegate methods so it's kinda hard to paste some code (i.e. it's not like I have only 1 NSURLConnection didReceiveData: call...it's a complex setup with a bunch of simultaneous connections, a Connect

Re: NSData downloaded over socket is bigger than it should be...

2008-12-18 Thread Michael Ash
On Thu, Dec 18, 2008 at 7:01 PM, Jean-Nicolas Jolivet wrote: > Well this is going to be a bit vague since my situation is a bit specific > but basically I am downloading data using AsyncSocket... then I'm saving it > directly to the HD... > However in like 80% of the cases, the resulting data on