mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MEDIUM: mux-h2: Implement h2_attach().
Implement h2_attach(), so that we can have multiple streams in one outgoin h2 connection.
This commit is contained in:
parent
c12f38fe32
commit
7a57e8a67a
14
src/mux_h2.c
14
src/mux_h2.c
@ -2721,7 +2721,19 @@ static struct task *h2_timeout_task(struct task *t, void *context, unsigned shor
|
|||||||
*/
|
*/
|
||||||
static struct conn_stream *h2_attach(struct connection *conn)
|
static struct conn_stream *h2_attach(struct connection *conn)
|
||||||
{
|
{
|
||||||
return NULL;
|
struct conn_stream *cs;
|
||||||
|
struct h2s *h2s;
|
||||||
|
struct h2c *h2c = conn->mux_ctx;
|
||||||
|
|
||||||
|
cs = cs_new(conn);
|
||||||
|
if (!cs)
|
||||||
|
return NULL;
|
||||||
|
h2s = h2c_bck_stream_new(h2c, cs);
|
||||||
|
if (!h2s) {
|
||||||
|
cs_free(cs);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieves the first valid conn_stream from this connection, or returns NULL.
|
/* Retrieves the first valid conn_stream from this connection, or returns NULL.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user