async-http-client
async-http-client copied to clipboard
Tracking Send/Upload Progress
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.
That's correct, yes. Can you suggest an outline of an API shape you'd like to use for tracking sent data?
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!
Is this delegate method sufficient for the use-case?
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.
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.
I would love to! Any deadlines to try to meet?
Nope, do this on your own time.