]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connections: Add a new mux method, "takeover".
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 19 Feb 2020 16:18:57 +0000 (17:18 +0100)
committerOlivier Houchard <cognet@ci0.org>
Thu, 19 Mar 2020 21:07:33 +0000 (22:07 +0100)
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.

include/types/connection.h

index 30cb895ff977417726fb3c199fa188ed5aa031d2..0136be94c74da6a9bb77b33b10cd3d59db6beae0 100644 (file)
@@ -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 */
 };