| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi,
my application is designed to upload files via an HTTP POST request. I am using libcurl to do this, as libcurl allows me to monitor the upload progress (which NSURLConnection obviously does not). However, I am having a problem: Naturally, I want the user to be able to click a button to immediately stop the upload. I am uploading the files in a secondary thread. If I use the good ol' technique that's using a BOOL variable to tell the secondary thread to stop, this won't work properly as the thread will only be able to check the variable between file uploads. So if the user triggers a 10 MB upload and wants to stop that, they will have to wait until the 10 MBs are uploaded before the thread stops.
The thing is, that I cannot interfere with the uploading (I guess). I simply call "curl_easy_perform()" and off it goes. The problem I've posted here to me seems to be one of the more fundamental "things-everybody-needs". E.g., Safari allows you to stop the download of files, too. So does more or less any networking application I can think of right now.
How are they doing that?
Regards, Michael
PS: Remember: I am talking about UPloading files. DOWNloading actually seems to be supported very well and boasting any feature you'd ever wish for...
_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.