void (*fct)(struct appctx *); /* internal I/O handler, may never be NULL */
size_t (*rcv_buf)(struct stconn *sc, struct buffer *buf, size_t count, unsigned int flags); /* called from the upper layer to get data */
size_t (*snd_buf)(struct stconn *sc, struct buffer *buf, size_t count, unsigned int flags); /* Called from the upper layet to put data */
- /* TODO: ADD fastfwd callback functions */
+ size_t (*fastfwd)(struct appctx *appctx, struct buffer *buf, size_t count, unsigned int flags); /* Callback to fast-forward data */
void (*release)(struct appctx *); /* callback to release resources, may be NULL */
unsigned int timeout; /* execution timeout. */
};
unsigned int flags; /* APPCTX_FL_* */
struct buffer inbuf;
struct buffer outbuf;
+ size_t to_forward;
struct buffer *chunk; /* used to store unfinished commands */
struct applet *applet; /* applet this context refers to */
if (src->verbosity == STRM_VERB_CLEAN)
return;
- chunk_appendf(&trace_buf, " appctx=%p .t=%p .t.exp=%d .flags=0x%x .st0=%d .st1=%d",
+ chunk_appendf(&trace_buf, " appctx=%p .t=%p .t.exp=%d .flags=0x%x .st0=%d .st1=%d to_fwd=%lu",
appctx, appctx->t, tick_isset(appctx->t->expire) ? TICKS_TO_MS(appctx->t->expire - now_ms) : TICK_ETERNITY,
- appctx->flags, appctx->st0, appctx->st1);
+ appctx->flags, appctx->st0, appctx->st1, appctx->to_forward);
if (!sc || src->verbosity == STRM_VERB_MINIMAL)
return;
appctx->flags = 0;
appctx->inbuf = BUF_NULL;
appctx->outbuf = BUF_NULL;
+ appctx->to_forward = 0;
LIST_INIT(&appctx->buffer_wait.list);
appctx->buffer_wait.target = appctx;