-
Notifications
You must be signed in to change notification settings - Fork 78
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 opening handshake in C++
This implements the opening handshake of pw_transfer's version 2 protocol within the C++ transfer client and server. The handshake consists of protocol version negotiation and ephemeral session ID assignment. The protocol version used for a transfer session is controlled by the client when it starts a new transfer. By default, this still remains the legacy protocol for now, though the client API is extended to allow specifying the desired version. If the START chunk a transfer service receives is configured for version 2, the service will assign a transfer session ID and proceed with the handshake. Otherwise, it will fall back to the legacy protocol. The version 2 START chunk sent by a client retains all of the chunk proto fields set by the legacy protocol, allowing it to be understood by a server which is not version 2 aware. In such a case, the server will process the chunk per the legacy protocol and send a non-handshake response. The client will recognize the legacy response and revert to running the legacy protocol. As a result of this, version 2 capable transfer clients and servers remain fully backwards-compatible with older code that only runs the legacy protocol. Change-Id: Ie0a295509e754b963d3a78593ba1c43bbe13c977 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/99500 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Alexei Frolov <frolv@google.com>
- Loading branch information
Showing
20 changed files
with
2,344 additions
and
357 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.