MINOR: connection: introduce conn_stream
This patch introduces a new struct conn_stream. It's the stream-side of
a multiplexed connection. A pool is created and destroyed on exit. For
now the conn_streams are not used at all.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index 8ba4fc6..8009372 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -31,6 +31,7 @@
#include <proto/obj_type.h>
extern struct pool_head *pool2_connection;
+extern struct pool_head *pool2_connstream;
extern struct xprt_ops *registered_xprt[XPRT_ENTRIES];
extern struct alpn_mux_list alpn_mux_list;
@@ -552,6 +553,11 @@
pool_free2(pool2_connection, conn);
}
+/* Returns the conn from a cs. If cs is NULL, returns NULL */
+static inline struct connection *cs_conn(const struct conn_stream *cs)
+{
+ return cs ? cs->conn : NULL;
+}
/* Retrieves the connection's source address */
static inline void conn_get_from_addr(struct connection *conn)