Commit Graph

3 Commits

Author SHA1 Message Date
Wyatt Hepler
e6209d9e14 pw_transfer: Reorganize code; ignore bad chunks after drops
- On writes, only send a transfer parameters update after the first
  chunk with an incorrect offset. This prevents storms of transfer
  parameters updates when early packets in the window are dropped. If
  that update is dropped, the client time out and resend its last chunk.
- Move transfer logic to the ServerContext class.
- Introduce the ClientConnection class, which represents a connection
  to a particular pw_transfer client. It bundles the server writers with
  the transfer parameters for those streams.

Change-Id: If68943610252c63c3044956f335a641523a8a917
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/63284
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-10-02 01:05:06 +00:00
Alexei Frolov
ff057e8ff9 pw_transfer: Start C++ client
This starts an implementation of a C++ transfer client suitable for
device to device transfers. Both read and write transfer support is
added. The code is incomplete and untested; pw_rpc raw clients are
required before this can be functional.

Change-Id: I17154c50986f7de8027fbc4e0143e86e3c64dd64
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/61792
Commit-Queue: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-09-28 00:16:04 +00:00
Alexei Frolov
563946f9fa pw_transfer: C++ service write support
This adds support for client-to-server write transfers to the C++
transfer service. Additionally, the transfer service is updated to
require the maximum chunk size as a constructor argument, as this
cannot easily be determined from the RPC system.

Change-Id: I8a6beb452ae3b8166702972182a418dd3cf13514
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56248
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-08-18 20:11:21 +00:00