|
|
# PRRT Receive Modes
|
|
|
|
|
|
PRRT supports different receive modes: [ASAP](#asap) and [Ordered](#ordered).
|
|
|
PRRT supports different receive modes: [ASAP](#asap-as-soon-as-possible) and [Ordered](#ordered).
|
|
|
|
|
|
## ASAP (As-Soon-As-Possible)
|
|
|
In this mode,
|
|
|
In this mode, packets are delivered as soon as they have been successfully received. If packets are reordered on the channel or need to be reconstructed using error coding, this is reflected in the order of delivery to the application layer.
|
|
|
|
|
|
## Ordered |
|
|
\ No newline at end of file |
|
|
## Ordered
|
|
|
In this mode, the `target_delay` that was specified at socket creation is considered and packets are delivered when they are due (sending time + `target_delay`). The receive calls allow to specify a time window that gives how early (relative to the deadline) a packet should be considered for delivery. Larger time windows reduce the portion of `target_delay` that can be used for reordering and error correction. Lower time windows might lead to lost packets due to expiry, if the application does not receive the packets fast enough from the delivery buffer.
|
|
|
|
|
|
|
|
|
## Blocking, Non-Blocking, Timed
|
|
|
Each mode comes with the following calls:
|
|
|
|
|
|
* `receive_[mode](...)`: Non-blocking call that returns an available packet or NULL.
|
|
|
* `receive_[mode]_wait(...)`: Blocking call that waits for until a single packet is available and returns it.
|
|
|
* `receive_[mode]_timedwait(..., deadline)`: Blocking call that waits until a packet is available and returns it or until `deadline`, in which case it returns NULL. |
|
|
\ No newline at end of file |