Skip to main content

Module constants

Module constants 

Source
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 FileMeta for 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-protocol handshake value is compatible with this build of the library.
protocol_header_value
The canonical x-libfw-protocol header value (e.g. libfw/1).