size_t (*snd_buf)(struct stconn *sc, struct buffer *buf, size_t count, int flags);
void (*detach)(struct qcs *qcs);
int (*finalize)(void *ctx);
- int (*is_active)(const struct qcc *qcc, void *ctx);
void (*release)(void *ctx);
void (*inc_err_cnt)(void *ctx, int err_code);
};
pool_free(pool_head_h3c, h3c);
}
-/* Check if the H3 connection can still be considered as active.
- *
- * Return true if active else false.
- */
-static int h3_is_active(const struct qcc *qcc, void *ctx)
-{
- if (qcc->strms[QCS_CLT_BIDI].nb_streams)
- return 1;
-
- return 0;
-}
-
/* Increment the h3 error code counters for <error_code> value */
static void h3_stats_inc_err_cnt(void *ctx, int err_code)
{
.snd_buf = h3_snd_buf,
.detach = h3_detach,
.finalize = h3_finalize,
- .is_active = h3_is_active,
.release = h3_release,
.inc_err_cnt = h3_stats_inc_err_cnt,
};
return total;
}
-static int hq_is_active(const struct qcc *qcc, void *ctx)
-{
- if (!eb_is_empty(&qcc->streams_by_id))
- return 1;
-
- return 0;
-}
-
const struct qcc_app_ops hq_interop_ops = {
.decode_qcs = hq_interop_decode_qcs,
.snd_buf = hq_interop_snd_buf,
- .is_active = hq_is_active,
};
static inline int qcc_is_dead(const struct qcc *qcc)
{
- if (qcc->app_ops && qcc->app_ops->is_active &&
- qcc->app_ops->is_active(qcc, qcc->ctx))
- return 0;
-
if ((qcc->conn->flags & CO_FL_ERROR) || !qcc->task)
return 1;