... | ... | @@ -6,7 +6,24 @@ PRRT supports different receive modes: [ASAP](#asap-as-soon-as-possible) and [Or |
|
|
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
|
|
|
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.
|
|
|
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.
|
|
|
|
|
|
```
|
|
|
---------------------------------------------------------------------> Time
|
|
|
| | |
|
|
|
T_send T_receive T_send +
|
|
|
target_delay
|
|
|
|
|
|
|
Case 1 (no packet delivered): |
|
|
|
| window | |
|
|
|
Now |
|
|
|
|
|
|
|
Case 2 (packet delivered): |
|
|
|
| window | |
|
|
|
Now
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## Synchronized, Gap-Preserving
|
|
|
TODO: Not yet implemented.
|
... | ... | @@ -20,9 +37,10 @@ Each mode comes with the following calls: |
|
|
|
|
|
## Examples
|
|
|
|
|
|
Ordered receive modes require a time window:
|
|
|
Ordered receive modes require a time window (given in microseconds):
|
|
|
|
|
|
```python
|
|
|
window = 5 * 1000 # 5 milliseconds
|
|
|
data, addr = socket.receive_ordered(window)
|
|
|
```
|
|
|
|
... | ... | |