se_fl_set(appctx->sedesc, SE_FL_WAIT_DATA);
}
+/* The applet indicates that it does not expect data from the opposite endpoint.
+ * This way the stream know it should not trigger read timeout on the other
+ * side.
+ */
+static inline void applet_expect_no_data(struct appctx *appctx)
+{
+ se_fl_set(appctx->sedesc, SE_FL_EXP_NO_DATA);
+}
+
+/* The applet indicates that it expects data from the opposite endpoint. This
+ * way the stream know it may trigger read timeout on the other side.
+ */
+static inline void applet_expect_data(struct appctx *appctx)
+{
+ se_fl_clr(appctx->sedesc, SE_FL_EXP_NO_DATA);
+}
+
/* writes chunk <chunk> into the input channel of the stream attached to this
* appctx's endpoint, and marks the SC_FL_NEED_ROOM on a channel full error.
* See ci_putchk() for the list of return codes.
SE_FL_MAY_SPLICE = 0x00040000, /* The endpoint may use the kernel splicing to forward data to the other side (implies SE_FL_CAN_SPLICE) */
SE_FL_RCV_MORE = 0x00080000, /* Endpoint may have more bytes to transfer */
SE_FL_WANT_ROOM = 0x00100000, /* More bytes to transfer, but not enough room */
- SE_FL_ENDP_MASK = 0x001ff000, /* Mask for flags set by the endpoint */
+ SE_FL_EXP_NO_DATA= 0x00200000, /* No data expected by the endpoint */
+ SE_FL_ENDP_MASK = 0x002ff000, /* Mask for flags set by the endpoint */
/* following flags are supposed to be set by the app layer and read by
* the endpoint :
*/
- SE_FL_WAIT_FOR_HS = 0x00200000, /* This stream is waiting for handhskae */
- SE_FL_KILL_CONN = 0x00400000, /* must kill the connection when the SC closes */
- SE_FL_WAIT_DATA = 0x00800000, /* stream endpoint cannot work without more data from the stream's output */
- SE_FL_WONT_CONSUME = 0x01000000, /* stream endpoint will not consume more data */
- SE_FL_HAVE_NO_DATA = 0x02000000, /* the endpoint has no more data to deliver to the stream */
- /* unused 0x04000000,*/
+ SE_FL_WAIT_FOR_HS = 0x00400000, /* This stream is waiting for handhskae */
+ SE_FL_KILL_CONN = 0x00800000, /* must kill the connection when the SC closes */
+ SE_FL_WAIT_DATA = 0x01000000, /* stream endpoint cannot work without more data from the stream's output */
+ SE_FL_WONT_CONSUME = 0x02000000, /* stream endpoint will not consume more data */
+ SE_FL_HAVE_NO_DATA = 0x04000000, /* the endpoint has no more data to deliver to the stream */
/* unused 0x08000000,*/
/* unused 0x10000000,*/
/* unused 0x20000000,*/
_(SE_FL_SHRD, _(SE_FL_SHRR, _(SE_FL_SHWN, _(SE_FL_SHWS,
_(SE_FL_NOT_FIRST, _(SE_FL_WEBSOCKET, _(SE_FL_EOI, _(SE_FL_EOS,
_(SE_FL_ERROR, _(SE_FL_ERR_PENDING, _(SE_FL_MAY_SPLICE,
- _(SE_FL_RCV_MORE, _(SE_FL_WANT_ROOM, _(SE_FL_WAIT_FOR_HS,
- _(SE_FL_KILL_CONN, _(SE_FL_WAIT_DATA, _(SE_FL_WONT_CONSUME,
- _(SE_FL_HAVE_NO_DATA, _(SE_FL_APPLET_NEED_CONN)))))))))))))))))))))));
+ _(SE_FL_RCV_MORE, _(SE_FL_WANT_ROOM, _(SE_FL_EXP_NO_DATA,
+ _(SE_FL_WAIT_FOR_HS, _(SE_FL_KILL_CONN, _(SE_FL_WAIT_DATA,
+ _(SE_FL_WONT_CONSUME, _(SE_FL_HAVE_NO_DATA, _(SE_FL_APPLET_NEED_CONN))))))))))))))))))))))));
/* epilogue */
_(~0U);
return buf;