I am wondering how it would be possible to resume a file download/send (without using raw sockets), and how to support downloading from multiple sources. Thanks in advance for the advice!
I am wondering how it would be possible to resume a file download/send (without using raw sockets), and how to support downloading from multiple sources. Thanks in advance for the advice!
Using what protocol?
If you understand what you're doing, you're not learning anything.
Dunno....I was gunna probably have to create my own. Any ideas on how this would be accomplished would be greatly appreciated.
You'd basicly need to create a list of what file chunks you have, and/or what ones you need. Also, you'd need to know what size the file is, or have to have a way for the sender to notify you that you've just been sent the end of that file.
Then, basicly what I'm thinking is you'd do something like:
source1, send me chunk 5
source2, send me chunk 8
source ...
And you'd stick the chunks in where they belong. A chunk would just be a bit of data of an arbitrary size that you've specified. You could do this by something like:
fseek to CHUNKSIZE * CHUNKTOGET, and read CHUNKSIZE into a buffer.
Now send that chunk to the client in whatever wrapper you've created. You then take that, unwrap it, and seek to your output file and write it in the correct spot.
That sound about right?
Quzah.
Hope is the first step on the road to disappointment.