Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advance Shard Downloader #1

Open
undertome opened this issue Nov 22, 2019 · 3 comments
Open

Advance Shard Downloader #1

undertome opened this issue Nov 22, 2019 · 3 comments

Comments

@undertome
Copy link
Owner

Add the following features to the SSLHTTPDownloader:

  • The ability to pause/resume downloads.

  • The ability to resume downloads after a software crash.

  • (Optional) The ability to download from multiple servers to a single file.

@undertome
Copy link
Owner Author

undertome commented Nov 22, 2019

Two options for interrupting the file download:

  • Override the on_body_impl method of the response_parser class. This method is called whenever the parser receives some data.

  • Change the download method from async_read to async_read_some. Place the latter in a loop, and in between calls, just check the isPaused_ member variable.

@undertome
Copy link
Owner Author

Two options for interrupting the file download:

  • Override the on_field_impl method of the response_parser class. This method is called whenever the parser receives some data.
  • Change the download method from async_read to async_read_some. Place the latter in a loop, and in between calls, just check the isPaused_ member variable.

Looks like the override method won't work. on_body_impl is private, so we can't call it after doing our stuff in an overridden method, and the method body accesses private members so we can't just duplicate the logic. Same for on_chunk_body_impl.

@undertome
Copy link
Owner Author

Testing to see whether multiple instances of handler cause issues. Should there be stronger enforcement of singleton use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant