pub struct UploadState {
pub upload_id: String,
pub offset: u64,
pub chunk_size: usize,
}Expand description
Reply describing a session’s current state.
Fields§
§upload_id: String§offset: u64Next byte the server expects.
chunk_size: usizeLargest chunk the caller may send.
Advertised rather than assumed: the ceiling depends on how this device
is reachable, and a client that guesses will guess wrong on one of
them. A relay-joined device advertises fs::RELAY_CHUNK_SIZE, which
fits the relay’s fixed request deadline; otherwise
fs::DEFAULT_CHUNK_SIZE. --fs-chunk-size overrides both.
This is a property of the device, not of the request. An earlier
version of this comment said the ceiling “depends on the path the
request travelled”, which was never true and could not have been: the
relay injects no marker and replays the caller’s headers verbatim
(relay::client::serve_one), so a handler cannot tell a relayed
request from a direct one. The value is chosen once, at startup, from
whether --relay was given — which means a direct caller on a
relay-joined device is told the smaller number too. Say what it does.