From: Willy Tarreau Date: Tue, 2 Oct 2012 23:12:30 +0000 (+0200) Subject: MINOR: connection: add an init callback to the data_cb struct X-Git-Tag: v1.5-dev13~217 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4e114fe546a3dace7475450ceda572a4685ea7b;p=thirdparty%2Fhaproxy.git MINOR: connection: add an init callback to the data_cb struct This callback is used to initialize the data layer. --- diff --git a/include/types/connection.h b/include/types/connection.h index c8858c36f9..ddc610e2b2 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -174,12 +174,15 @@ struct xprt_ops { * callbacks are supposed to make use of the xprt_ops above to exchange data * from/to buffers and pipes. The callback is used to report activity * at the transport layer, which can be a connection opening/close, or any - * data movement. + * data movement. The callback may be called by the connection handler + * at the end of a transport handshake, when it is about to transfer data and + * the data layer is not ready yet. */ struct data_cb { void (*recv)(struct connection *conn); /* data-layer recv callback */ void (*send)(struct connection *conn); /* data-layer send callback */ void (*wake)(struct connection *conn); /* data-layer callback to report activity */ + int (*init)(struct connection *conn); /* data-layer initialization */ }; /* a target describes what is on the remote side of the connection. */