se_fl_set(se, SE_FL_APPLET_NEED_CONN);
}
-/* The stream connector just got the input buffer it was waiting for */
-static inline void cs_rx_buff_rdy(struct stconn *cs)
+/* The application layer tells the stream connector that it just got the input
+ * buffer it was waiting for.
+ */
+static inline void sc_have_buff(struct stconn *cs)
{
sc_ep_clr(cs, SE_FL_RXBLK_BUFF);
}
/* The stream connector failed to get an input buffer and is waiting for it.
- * Since it indicates a willingness to deliver data to the buffer that will
- * have to be retried, we automatically clear RXBLK_ENDP to be called again
- * as soon as RXBLK_BUFF is cleared.
+ * It indicates a willingness to deliver data to the buffer that will have to
+ * be retried, as such, callers will often automatically clear RXBLK_ENDP to be
+ * called again as soon as RXBLK_BUFF is cleared.
*/
-static inline void cs_rx_buff_blk(struct stconn *cs)
+static inline void sc_need_buff(struct stconn *cs)
{
sc_ep_set(cs, SE_FL_RXBLK_BUFF);
}
if (!se_fl_test(appctx->sedesc, SE_FL_RXBLK_BUFF))
return 0;
- cs_rx_buff_rdy(cs);
+ sc_have_buff(cs);
/* was already allocated another way ? if so, don't take this one */
if (c_size(sc_ic(cs)) || sc_ic(cs)->pipe)
/* allocation possible now ? */
if (!b_alloc(&sc_ic(cs)->buf)) {
- cs_rx_buff_blk(cs);
+ sc_need_buff(cs);
return 0;
}
if (!s->req.buf.size && !s->req.pipe && sc_ep_test(s->scf, SE_FL_RXBLK_BUFF) &&
b_alloc(&s->req.buf))
- cs_rx_buff_rdy(s->scf);
+ sc_have_buff(s->scf);
else if (!s->res.buf.size && !s->res.pipe && sc_ep_test(s->scb, SE_FL_RXBLK_BUFF) &&
b_alloc(&s->res.buf))
- cs_rx_buff_rdy(s->scb);
+ sc_have_buff(s->scb);
else
return 0;