• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Audio file download over HTTP issue!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio file download over HTTP issue!


  • Subject: Audio file download over HTTP issue!
  • From: "Ulhas Morbale" <email@hidden>
  • Date: Mon, 22 Oct 2007 18:13:31 +0530

Hello There,
 
I am facing the problem regarding download(pure download no streaming!!!) a audio file over HTTP protocol.When I debug my following code it downloads all data(~3MB) to my local system & writes to the file and if I run without debug it returns only 4KB data. why it is so?
 
void Write_Local(CFReadStreamRef readStreamRef, CFWriteStreamRef writeStreamRef)
{
    CFReadStreamOpen(readStreamRef);
    CFWriteStreamOpen(writeStreamRef);
   
    UInt8 buf[2048];
    CFIndex totalBytesRead=0, bytesRead=0;
    CFIndex totalBytesWritten=0;
   
    do{
            bytesRead = CFReadStreamRead(readStreamRef, buf, bufLength);
           
            if(!bytesRead)
                printf("ERROR!");
 
            totalBytesRead+=bytesRead;
            if(writeStreamRef)
                totalBytesWritten += CFWriteStreamWrite(writeStreamRef, buf, bytesRead);       
        }while(bytesRead == bufLength)
       
        CFWriteStreamClose(writeStreamRef);
        CFReadStreamClose(readStreamRef);
}
 
I am not getting any error, but can't able to download large data. What is the problem with this code? Is that the buf size or anything else? Help is greatly appreciated. Thanks in advance.
 
Many Thanks,
Ulhas Morbale
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Audio file download over HTTP issue!
      • From: Frederick Cheung <email@hidden>
  • Prev by Date: sunil is your Yaar! :)
  • Next by Date: Re: Audio file download over HTTP issue!
  • Previous by thread: sunil is your Yaar! :)
  • Next by thread: Re: Audio file download over HTTP issue!
  • Index(es):
    • Date
    • Thread