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

Tracking Send/Upload Progress #819

Open
mredig opened this issue Mar 2, 2025 · 7 comments
Open

Tracking Send/Upload Progress #819

mredig opened this issue Mar 2, 2025 · 7 comments

Comments

@mredig
Copy link

mredig commented Mar 2, 2025

Am I correct that to track the progress of sent data, you need to use a delegate? And further, I would need to use futures to use the delegate? I can't seem to figure out how to do either of those things (tracking send progress being the goal) without using event futures.

If I am correct, let's file this under a feature request to allow for delegate/ability otherwise to track send progress.

@Lukasa
Copy link
Collaborator

Lukasa commented Mar 3, 2025

That's correct, yes. Can you suggest an outline of an API shape you'd like to use for tracking sent data?

@mredig
Copy link
Author

mredig commented Mar 3, 2025

Well the delegate would be satisfactory for me. I am not against passing a delegate into an individual network call, either, just like the futures interface offers.

This is just my initial thought, tho. I'll give it a bit deeper thought and try to get back soon!

@Lukasa
Copy link
Collaborator

Lukasa commented Mar 3, 2025

Is this delegate method sufficient for the use-case?

@mredig
Copy link
Author

mredig commented Mar 3, 2025

Sufficient, yes! I feel dirty using IOData though, since it's marked for deprecation :P

This method is actually how I'm currently achieving what I need, albeit through the futures interface.

@Lukasa
Copy link
Collaborator

Lukasa commented Mar 3, 2025

Oh dang, ok, so that we can deal with. Would you be open to producing a patch that adds a variant of that method that just accepts ByteBuffer? I think the patch would require deprecating & defaulting the IOData-taking one, as that method is obviously not safe for us to actually use. We can then default the new ByteBuffer-taking one to call the old IOData-taking one.

@mredig
Copy link
Author

mredig commented Mar 3, 2025

I would love to! Any deadlines to try to meet?

@Lukasa
Copy link
Collaborator

Lukasa commented Mar 3, 2025

Nope, do this on your own time.

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

2 participants