-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add onBlock processor to all requests #139
Comments
onBlock
processor to all requests
Way to go! The callback could/should(?) return a promise and get handed in if the given block is the last one. To know its the last block is crucial for some transforms, like crypto or checksum calculation. What do you mean by that?
|
Whoops, I looked at your use-case and I figured you could just call How about I also add an |
Scratch that, I rushed jotting down this ticket a little. I removed this requirement. |
An additional argument to onBlock could indicate it's the last block. Why would it be too late to call aes.finish then? Either way, conform to known node patterns or a single callback function is fine with me. |
Your solution with the
Alright, thank you for your confirmation; the |
Originally suggested by @pke in #136
The library is missing the support for processing data that is being transferred.
Proposed solution
.onBlock(fn: (block) => void, settings?: { blockSize: number })
, similar toonProgress
.onFinishStream(fn: (block) => void)
which will be called instead of.onBlock
when the last block of the stream arrivesProgress
.onBlock
method to TypeScript code base.onFinishStream
method to TypeScript code base.onBlock
and.onFinishStream
over the bridge on Android.onBlock
and.onFinishStream
over the bridge on iOS.onBlock
and.onFinishStream
-callbacksThe text was updated successfully, but these errors were encountered: