Warning: This is a development version. The latest stable version is Version 4.0.1.
Rely supports encoding and decoding payloads of variable sizes. This feature has two explicit goals:
max_packet_bytes
parameter in
rely::encoder::configure()
and
rely::decoder::configure().
This may involve fragmenting payloads.Note
In many cases there will be a one-to-one relationship between payloads
and source symbols.
However, if the size of a payload is larger than what can be contained
in a packet (based on max_packet_bytes
), the payload will be
fragmented into multiple source symbols.
In the following we will explain what this means exactly and this is handled in the encoder and decoder.
In order to minimize overhead Rely uses two techniques:
The following figure illustrates this approach:
In the above source symbol s1, s2, s3 and s4
are sent as is, whereas the repair symbol Σs will have the size of the
largest source symbol in the coding window (in this the size of s3,
9
).
As the coding window moves old source symbols are dropped and new ones may be added. In this case the size of the repair symbols will increase and decrease accordingly.
In order to avoid exceeding the MTU of on a given network Rely will
fragment payloads such that packets produced by the Rely encoder will be
smaller than or equal to the max_packet_bytes
configuration value.
This allows support for applications that generate payloads larger than the network MTU, but also provides space for the Rely header in situations where the incoming payloads already match the network MTU.
Note
Any fragmentation performed by the Rely encoder will be undone by the Rely decoder before forwarding the decoded payload.