psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.08k stars 55 forks source link

Add minimal support for WithProgress to SendText #22

Closed psanford closed 3 years ago

psanford commented 3 years ago

Previously SendText ignored the WithProgress option. Now it will update the progressFunc a single time after it has gotten confirmation the transfer is complete.

We can't do much better than this. Since SendText uses the mailbox server to transfer the message we don't know how much progress the client is making in reading the message.

The main purpose of doing this is to simplify client implementations that share code between the Send() and SendText() code paths. (The python Magic Wormhole CLI and the wormhole-william CLI do not show a progress bar for send text for this reason).