int redispatch_after; /* number of retries before redispatch */
unsigned down_time; /* total time the proxy was down */
int (*accept)(struct stream *s); /* application layer's accept() */
+ void *(*stream_new_from_sc)(struct session *sess, struct stconn *sc, struct buffer *in); /* stream instantiation callback for mux stream connector */
struct conn_src conn_src; /* connection source settings */
enum obj_type *default_target; /* default target to use for accepted streams or NULL */
struct proxy *next;
extern struct data_cb sess_conn_cb;
-struct stream *stream_new(struct session *sess, struct stconn *sc, struct buffer *input);
+void *stream_new(struct session *sess, struct stconn *sc, struct buffer *input);
void stream_free(struct stream *s);
int stream_upgrade_from_sc(struct stconn *sc, struct buffer *input);
int stream_set_http_mode(struct stream *s, const struct mux_proto_list *mux_proto);
/* Default to only allow L4 retries */
p->retry_type = PR_RE_CONN_FAILED;
+ p->stream_new_from_sc = stream_new;
guid_init(&p->guid);
p->extra_counters_fe = NULL;
curproxy->clitcpka_cnt = defproxy->clitcpka_cnt;
curproxy->clitcpka_idle = defproxy->clitcpka_idle;
curproxy->clitcpka_intvl = defproxy->clitcpka_intvl;
+ curproxy->stream_new_from_sc = defproxy->stream_new_from_sc;
}
if (curproxy->cap & PR_CAP_BE) {
sc = sc_new(sd);
if (unlikely(!sc))
return NULL;
- if (unlikely(!stream_new(sess, sc, input))) {
+ if (unlikely(!sess->fe->stream_new_from_sc(sess, sc, input))) {
sd->sc = NULL;
if (sc->sedesc != sd) {
/* none was provided so sc_new() allocated one */
* transfer to the stream and <input> is set to BUF_NULL. On error, <input>
* buffer is unchanged and it is the caller responsibility to release it.
*/
-struct stream *stream_new(struct session *sess, struct stconn *sc, struct buffer *input)
+void *stream_new(struct session *sess, struct stconn *sc, struct buffer *input)
{
struct stream *s;
struct task *t;