]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: protocol: add a new function accept_conn()
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 08:07:46 +0000 (10:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
This per-protocol function will be used to accept an incoming
connection and return it as a struct connection*. As such the protocol
stack's internal representation of a connection will not need to be
handled by the listener code.

include/haproxy/protocol-t.h

index f2aa4affe451e54de076e6d17de275f05a141c5c..499609dc0e4952ec9aed2dc5dac92e4956c77e6e 100644 (file)
@@ -94,6 +94,7 @@ struct protocol {
        void (*unbind)(struct listener *l);             /* unbind the listener and possibly its receiver */
        int (*suspend)(struct listener *l);             /* try to suspend the listener */
        int (*resume)(struct listener *l);              /* try to resume a suspended listener */
+       struct connection *(*accept_conn)(struct listener *l, int *status); /* accept a new connection */
 
        /* functions acting on the receiver */
        void (*rx_enable)(struct receiver *rx);         /* enable receiving on the receiver */