picoquic/frames.c
uint64_t picoquic_compute_ack_gap(picoquic_cnx_t* cnx, uint64_t data_rate)
{
    uint64_t ack_gap = 1;

    if (data_rate > PICOQUIC_BANDWIDTH_MEDIUM) {
        if (cnx->path[0]->rtt_min > PICOQUIC_TARGET_RENO_RTT) {
            ack_gap = 10;
        }
        else {
            ack_gap = 4;
        }
    }
    else {
        ack_gap = 2;
    }

    return ack_gap;
}
/* Compute the desired number of packets coalesce in a single ACK.
 * This will be used to compute the value sent to the peer in the ACK FREQUENCY frame,
 * using the bandwidth estimate computed from received ACKs.
 * When the ACK FREQUENCY is not negotiated, this will be computed locally,
 * using the estimated received rate.
 * The computed value is only used if it is not overriden:
 * - For the Initial and Handshake contexts the gap is always 1.
 * - If "ack_after_fin" is set the gap is always 1.
 * - If packets are received out of order and the peer is sensitive, the gap is 1.
 */
Compute the desired number of packets coalesce in a single ACK.
This will be used to compute the value sent to the peer in the ACK FREQUENCY frame,
using the bandwidth estimate computed from received ACKs.
When the ACK FREQUENCY is not negotiated, this will be computed locally,
using the estimated received rate.
The computed value is only used if it is not overriden:
- For the Initial and Handshake contexts the gap is always 1.
- If "ack_after_fin" is set the gap is always 1.
- If packets are received out of order and the peer is sensitive, the gap is 1.
Compute the desired number of packets coalesce in a single ACK . This will be used to compute the value sent to the peer in the ACK FREQUENCY frame using the bandwidth estimate computed from received ACKs . When the ACK FREQUENCY is not negotiated this will be computed locally using the estimated received rate . The computed value is only used if it is not overriden : - For the Initial and Handshake contexts the gap is always 1 . - If " ack_after_fin " is set the gap is always 1 . - If packets are received out of order and the peer is sensitive the gap is 1 .
uint64_t picoquic_compute_ack_gap(picoquic_cnx_t* cnx, uint64_t data_rate)
{
    uint64_t ack_gap = 1;
    if (data_rate > PICOQUIC_BANDWIDTH_MEDIUM) {
        if (cnx->path[0]->rtt_min > PICOQUIC_TARGET_RENO_RTT) {
            ack_gap = 10;
        }
        else {
            ack_gap = 4;
        }
    }
    else {
        ack_gap = 2;
    }
    return ack_gap;
}
uint64_t picoquic_compute_ack_gap ( picoquic_cnx_t * cnx , uint64_t data_rate ) { uint64_t ack_gap = 1 ; if ( data_rate > PICOQUIC_BANDWIDTH_MEDIUM ) { if ( cnx -> path [ 0 ] -> rtt_min > PICOQUIC_TARGET_RENO_RTT ) { ack_gap = 10 ; } else { ack_gap = 4 ; } } else { ack_gap = 2 ; } return ack_gap ; }
Compute the desired number of packets coalesce in a single ACK.
Compute the desired number of packets coalesce in a single ACK .