|
Electroneum
|

Go to the source code of this file.
Classes | |
| struct | rtt_info |
Macros | |
| #define | RTT_MAX_TIMEOUT 120000 |
Functions | |
| void | rtt_init (struct rtt_info *rtt) |
| int | rtt_timeout (const struct rtt_info *rtt) |
| int | rtt_unclamped (const struct rtt_info *rtt) |
| int | rtt_notimeout (const struct rtt_info *rtt) |
| void | rtt_update (struct rtt_info *rtt, int ms) |
| void | rtt_lost (struct rtt_info *rtt, int orig) |
Variables | |
| int | RTT_MIN_TIMEOUT |
This file contains a data type and functions to help estimate good round trip times for UDP resend timeout values.
Definition in file rtt.h.
| #define RTT_MAX_TIMEOUT 120000 |
| void rtt_init | ( | struct rtt_info * | rtt | ) |
Initialize RTT estimators.
| rtt | The structure. Caller is responsible for allocation of it. |
| void rtt_lost | ( | struct rtt_info * | rtt, |
| int | orig | ||
| ) |
Update the statistics with a new timeout expired observation.
| rtt | round trip statistics structure. |
| orig | original rtt time given for the query that timed out. Used to calculate the maximum responsible backed off time that can reasonably be applied. |
| int rtt_notimeout | ( | const struct rtt_info * | rtt | ) |
RTT for valid responses. Without timeouts.
| rtt | round trip statistics structure. |
| int rtt_timeout | ( | const struct rtt_info * | rtt | ) |
Get timeout to use for sending a UDP packet.
| rtt | round trip statistics structure. |
| int rtt_unclamped | ( | const struct rtt_info * | rtt | ) |
Get unclamped timeout to use for server selection. Recent timeouts are reflected in the returned value.
| rtt | round trip statistics structure. |
| void rtt_update | ( | struct rtt_info * | rtt, |
| int | ms | ||
| ) |
Update the statistics with a new roundtrip estimate observation.
| rtt | round trip statistics structure. |
| ms | estimate of roundtrip time in milliseconds. |
| int RTT_MIN_TIMEOUT |
min retransmit timeout value, in milliseconds