DataSocket

How can i put pause and resume buttons for a download in DataSocket?

Any ideas?

I think the lack of replies means no one is sure what it is you’re asking

I need to pause or resume a download with DataSocket. For example i am downloading something with DataSocket, and i’d like to stop the download for a moment. So i click the “Pause Button”. Then i ‘d to continue downloading. So i click the “Resume Button”.

Resumable downloads are a lot more than just a pause & resume button
The server end needs to support it otherwise your client can tell the server anything it wants and the server will just send the entire file again

But is not a WebApp

This has nothing to do with web apps

When an application sends a request to a “server” of some kind (and here it will depend on the protocol in use) it says “send me this file”

What you want is that back end server and client application to agree that the client can send a request like “send me that file starting from byte X” and that the server will do the right thing with that request

Otherwise the server (where you get the file from) will just send the whole thing again

This is known as resumable downloads

http://weblog.west-wind.com/posts/2004/Feb/07/Using-HTTP-Ranges-to-resume-resume-aborted-downloads

So what i need is disconect the data socket with the button “Pause” and then restart downloading starting from the last byte… but this is the hard thing, start a download from a determinate byte. Well let me check. Thanks in advance!