-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_transfer: Version 2 completion handshake in C++
In legacy transfer, completions were one-sided. As such, there was no guarantee that the peer of a transfer recognized that it was finished. If the completion chunk was lost, the peer would continue trying to send regular chunks until it timed out, while the terminator could already have cleaned up all of its resources and been reused in a new context. This has led to several bugs in projects using pw_transfer. This change updates the completion protocol in transfer v2 to require that completion chunks are acknowledged. After one side of the transfer terminates with a completion chunk, it waits for the peer to acknowledge the completion. The completion chunk is re-sent in response to non-ack chunks or following a timeout. Change-Id: Ic5924caab4aad4c2ddfc5a897e521937ea553d45 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/102600 Commit-Queue: Alexei Frolov <[email protected]> Reviewed-by: Wyatt Hepler <[email protected]>
- Loading branch information
Showing
9 changed files
with
552 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.