From: Olivier Houchard Date: Wed, 19 Feb 2020 16:18:57 +0000 (+0100) Subject: MINOR: connections: Add a new mux method, "takeover". X-Git-Tag: v2.2-dev5~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00bdce24d5aabcd5e4cb69c70207278497ad4552;p=thirdparty%2Fhaproxy.git MINOR: connections: Add a new mux method, "takeover". Add a new mux method, "takeover", that will attempt to make the current thread responsible for the connection. It should return 0 on success, and non-zero on failure. --- diff --git a/include/types/connection.h b/include/types/connection.h index 30cb895ff9..0136be94c7 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -369,6 +369,7 @@ struct mux_ops { void (*reset)(struct connection *conn); /* Reset the mux, because we're re-trying to connect */ const struct cs_info *(*get_cs_info)(struct conn_stream *cs); /* Return info on the specified conn_stream or NULL if not defined */ int (*ctl)(struct connection *conn, enum mux_ctl_type mux_ctl, void *arg); /* Provides informations about the mux */ + int (*takeover)(struct connection *conn); /* Attempts to migrate the connection to the current thread */ unsigned int flags; /* some flags characterizing the mux's capabilities (MX_FL_*) */ char name[8]; /* mux layer name, zero-terminated */ };