|
libwebsockets
Lightweight C library for HTML5 websockets
|
#include <lws-quic.h>
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) |
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.
| init | (re)start the controller's state for the connection, also on path migration |
| on_sent | bytes of an ack-eliciting packet went on the wire |
| on_ack | bytes acknowledged, with an RTT sample for the largest |
| on_loss | bytes declared lost by loss detection, react on cwnd |
| on_discard | bytes 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_congestion | collapse cwnd to the minimum |
| can_send | may bytes more go out now |
| get_pacing_delay | usecs to wait before bytes_to_send may go out |
Definition at line 196 of file lws-quic.h.
| void(* lws_cc_ops::init) (struct lws *nwsi) |
Definition at line 197 of file lws-quic.h.
| void(* lws_cc_ops::on_sent) (struct lws *nwsi, size_t bytes) |
Definition at line 198 of file lws-quic.h.
| 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.
| void(* lws_cc_ops::on_loss) (struct lws *nwsi, size_t bytes_lost) |
Definition at line 200 of file lws-quic.h.
| void(* lws_cc_ops::on_discard) (struct lws *nwsi, size_t bytes_discarded) |
Definition at line 201 of file lws-quic.h.
| void(* lws_cc_ops::on_persistent_congestion) (struct lws *nwsi) |
Definition at line 202 of file lws-quic.h.
| int(* lws_cc_ops::can_send) (struct lws *nwsi, size_t bytes) |
Definition at line 203 of file lws-quic.h.
| 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.