Expand description
Protocol constants shared between server and client.
Constants§
- CHUNK_
SIZE - Fixed chunk size for fragmented transfers (2 MiB).
- DEFAULT_
CONCURRENCY - Maximum default concurrent connections in the WASM engine.
- DEFAULT_
DOWNLOAD_ CHUNK_ SIZE - Default chunk size for parallel (byte-range) downloads — 256 KiB.
- DEFAULT_
DOWNLOAD_ WINDOW - Default in-flight chunk window for a single file’s download.
- DEFAULT_
MAX_ UPLOAD_ SIZE - Default cap for a single upload (100 GiB, configurable by the server).
- DEFAULT_
SESSION_ TTL - Server-side TTL after which an unfinished “session” upload temp (and its
.blocksrange sidecar) is considered stale and garbage-collected. - DEFAULT_
UPLOAD_ WINDOW - Default in-flight chunk window for a single file’s upload.
- HEADER_
COMPRESS - HTTP header advertising the compression algorithm on a body stream.
- HEADER_
FILE_ META - HTTP header carrying JSON-encoded
FileMetafor an upload or download. - HEADER_
FINAL - HTTP header marking an upload request as the FINAL chunk of a file.
- HEADER_
OFFSET - HTTP header carrying the byte offset to resume an interrupted upload.
- HEADER_
PROTOCOL - HTTP header carrying the (optional) transfer version handshake.
- HEADER_
SESSION - HTTP header carrying a per-upload session id.
- HEADER_
SESSION_ STATUS - HTTP header turning a session
POSTinto a status probe. - MAX_
RETRIES - Default maximum retry count for a failed chunk before failing the task.
- MIN_
PARALLEL_ DOWNLOAD_ BYTES - A file with fewer remaining bytes than this stays on the sequential single-connection download path; larger files use the parallel range-GET path (which has per-request overhead that only pays off at size).
- PROTOCOL_
NAME - Protocol name used in the handshake header.
- PROTOCOL_
VERSION - Protocol version used in the handshake header.
- STREAM_
BUF_ SIZE - Constant sliding-window size for streaming (64 KiB).
Functions§
- protocol_
compatible - Whether a received
x-libfw-protocolhandshake value is compatible with this build of the library. - protocol_
header_ value - The canonical
x-libfw-protocolheader value (e.g.libfw/1).