Available on crate feature
tokio only.Expand description
Tokio async adapter — drives the sans-I/O core over an
AsyncRead + AsyncWrite transport.
Mirrors adapters::blocking one-for-one,
returning the same UploadStats / UploadError types.
§Read timeout
Every inbound read is wrapped in
tokio::time::timeout
keyed to Session::response_timeout.
On Elapsed the adapter falls through to tick() so retransmits and the
total-budget timeout still fire on a quiet transport. Without this wrapping
a stalled peer would leave the future Pending forever.
§Lifecycle handled for you
- Send
M28 B1to enter binary mode. - SYNC handshake.
- QUERY → compression negotiation.
- OPEN, WRITE × N, CLOSE.
- Control CLOSE (proto=0, type=2) so the device exits binary mode.
Re-exports§
pub use crate::adapters::common::Progress;pub use crate::adapters::common::ProgressCallback;pub use crate::adapters::common::UploadError;pub use crate::adapters::common::UploadOptions;pub use crate::adapters::common::UploadStats;
Functions§
- upload
- Async equivalent of
adapters::blocking::upload.