From 1e509a7231ad70ce18760962decbe46b38b8872a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 15 Oct 2020 10:07:46 +0200 Subject: [PATCH] MINOR: protocol: add a new function accept_conn() 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h index f2aa4affe..499609dc0 100644 --- a/include/haproxy/protocol-t.h +++ b/include/haproxy/protocol-t.h @@ -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 */