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_
MAX_ UPLOAD_ SIZE - Default cap for a single upload (100 GiB, configurable by the server).
- 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.
- MAX_
RETRIES - Default maximum retry count for a failed chunk before failing the task.
- 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).