Module block_handler

Source
Expand description

General purpose implementation of block transfer support (RFC 7959).

Supports both Block1 and Block2 and is intended to be compliant with the standard but lenient to tolerate mixed use cases. In-memory caching of request and response bodies is used to achieve the generic interaction.

Structs§

BlockHandler
Implements block transfer by intercepting and caching requests and responses.
BlockHandlerConfig
The configuration for BlockHandler.
BlockState
State that is maintained over several requests.
BlockValue
The block option value.
RequestCacheKey
Cache key for uniquely identifying a request.

Functions§

extending_splice
Similar to Vec::splice except that the Vec’s length may be extended to support the splice, but only up to an increase of maximum_reserve_len (for security reasons if the data you’re receiving is untrusted ensure this is reasonably limited to avoid memory pressure denial of service attacks).