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/obj_type.h b/include/proto/obj_type.h
index 60265b5..617464c 100644
--- a/include/proto/obj_type.h
+++ b/include/proto/obj_type.h
@@ -119,6 +119,18 @@
return __objt_appctx(t);
}
+static inline struct conn_stream *__objt_cs(enum obj_type *t)
+{
+ return (container_of(t, struct conn_stream, obj_type));
+}
+
+static inline struct conn_stream *objt_cs(enum obj_type *t)
+{
+ if (!t || *t != OBJ_TYPE_CS)
+ return NULL;
+ return __objt_cs(t);
+}
+
static inline struct connection *__objt_conn(enum obj_type *t)
{
return container_of(t, struct connection, obj_type);
@@ -152,6 +164,7 @@
case OBJ_TYPE_APPLET: return __objt_applet(t);
case OBJ_TYPE_APPCTX: return __objt_appctx(t);
case OBJ_TYPE_CONN: return __objt_conn(t);
+ case OBJ_TYPE_CS: return __objt_cs(t);
default: return NULL;
}
}