]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: Add callbacks definitions for QUIC.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 18 Feb 2021 09:04:27 +0000 (10:04 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Sep 2021 13:27:25 +0000 (15:27 +0200)
The flow control at stream level is organized by types (client bidi, server bidi,
client uni, server uni). Adds at least callback to retrieve the number
of available streams by direction.

include/haproxy/connection-t.h

index 1afae9624da68a48a9bc326acf60056f26bda469..28dbbf4b7837bf015edcb98f20d85e343f613075 100644 (file)
@@ -50,6 +50,7 @@ struct session;
 struct pipe;
 struct quic_conn;
 struct bind_conf;
+struct qcs;
 
 /* Note: subscribing to these events is only valid after the caller has really
  * attempted to perform the operation, and failed to proceed or complete.
@@ -421,7 +422,13 @@ struct mux_ops {
        int (*show_fd)(struct buffer *, struct connection *); /* append some data about connection into chunk for "show fd"; returns non-zero if suspicious */
        int (*subscribe)(struct conn_stream *cs, int event_type,  struct wait_event *es); /* Subscribe <es> to events, such as "being able to send" */
        int (*unsubscribe)(struct conn_stream *cs, int event_type,  struct wait_event *es); /* Unsubscribe <es> from events */
+       int (*ruqs_subscribe)(struct qcs *qcs, int event_type,  struct wait_event *es); /* Subscribe <es> to events, "being able to receive" only */
+       int (*ruqs_unsubscribe)(struct qcs *qcs, int event_type,  struct wait_event *es); /* Unsubscribe <es> from events */
+       int (*luqs_subscribe)(struct qcs *qcs, int event_type,  struct wait_event *es); /* Subscribe <es> to events, "being able to send" only */
+       int (*luqs_unsubscribe)(struct qcs *qcs, int event_type,  struct wait_event *es); /* Unsubscribe <es> from events */
        int (*avail_streams)(struct connection *conn); /* Returns the number of streams still available for a connection */
+       int (*avail_streams_bidi)(struct connection *conn); /* Returns the number of bidirectional streams still available for a connection */
+       int (*avail_streams_uni)(struct connection *conn); /* Returns the number of unidirectional streams still available for a connection */
        int (*used_streams)(struct connection *conn);  /* Returns the number of streams in use on a connection. */
        void (*destroy)(void *ctx); /* Let the mux know one of its users left, so it may have to disappear */
        int (*ctl)(struct connection *conn, enum mux_ctl_type mux_ctl, void *arg); /* Provides information about the mux */