libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws_cc_ops Struct Reference

#include <lws-quic.h>

Collaboration diagram for lws_cc_ops:

Data Fields

void(* init )(struct lws *nwsi)
void(* on_sent )(struct lws *nwsi, size_t bytes)
void(* on_ack )(struct lws *nwsi, size_t bytes_acked, lws_usec_t rtt)
void(* on_loss )(struct lws *nwsi, size_t bytes_lost)
void(* on_discard )(struct lws *nwsi, size_t bytes_discarded)
void(* on_persistent_congestion )(struct lws *nwsi)
int(* can_send )(struct lws *nwsi, size_t bytes)
lws_usec_t(* get_pacing_delay )(struct lws *nwsi, size_t bytes_to_send)

Detailed Description

struct lws_cc_ops - a QUIC congestion controller

Set in lws_context_creation_info.quic_cc_ops to select one of the controllers below or supply your own. Every op may be NULL and is then skipped, but the byte accounting ops come as a set: whatever on_sent adds to the controller's idea of bytes in flight is only ever taken back by on_ack, on_loss and on_discard. A controller that counts in-flight bytes must implement all four, or each PTO requeue leaves its bytes counted for the life of the connection and the window closes.

Parameters
init(re)start the controller's state for the connection, also on path migration
on_sentbytes of an ack-eliciting packet went on the wire
on_ackbytes acknowledged, with an RTT sample for the largest
on_lossbytes declared lost by loss detection, react on cwnd
on_discardbytes taken out of flight without ack or loss: a PTO requeue (RFC 9002 6.2.4, cwnd must not react) or a purged stream. Only the in-flight count is corrected.
on_persistent_congestioncollapse cwnd to the minimum
can_sendmay bytes more go out now
get_pacing_delayusecs to wait before bytes_to_send may go out

Definition at line 196 of file lws-quic.h.

Field Documentation

◆ init

void(* lws_cc_ops::init) (struct lws *nwsi)

Definition at line 197 of file lws-quic.h.

◆ on_sent

void(* lws_cc_ops::on_sent) (struct lws *nwsi, size_t bytes)

Definition at line 198 of file lws-quic.h.

◆ on_ack

void(* lws_cc_ops::on_ack) (struct lws *nwsi, size_t bytes_acked, lws_usec_t rtt)

Definition at line 199 of file lws-quic.h.

◆ on_loss

void(* lws_cc_ops::on_loss) (struct lws *nwsi, size_t bytes_lost)

Definition at line 200 of file lws-quic.h.

◆ on_discard

void(* lws_cc_ops::on_discard) (struct lws *nwsi, size_t bytes_discarded)

Definition at line 201 of file lws-quic.h.

◆ on_persistent_congestion

void(* lws_cc_ops::on_persistent_congestion) (struct lws *nwsi)

Definition at line 202 of file lws-quic.h.

◆ can_send

int(* lws_cc_ops::can_send) (struct lws *nwsi, size_t bytes)

Definition at line 203 of file lws-quic.h.

◆ get_pacing_delay

lws_usec_t(* lws_cc_ops::get_pacing_delay) (struct lws *nwsi, size_t bytes_to_send)

Definition at line 204 of file lws-quic.h.


The documentation for this struct was generated from the following file: