appctx->applet->release(appctx);
}
+/* let an applet indicate that it wants to put some data into the input buffer */
+static inline void si_applet_want_put(struct stream_interface *si)
+{
+ si->flags |= SI_FL_WANT_PUT;
+}
+
+/* let an applet indicate that it wanted to put some data into the input buffer
+ * but it couldn't.
+ */
+static inline void si_applet_cant_put(struct stream_interface *si)
+{
+ si->flags |= SI_FL_WANT_PUT | SI_FL_WAIT_ROOM;
+}
+
+/* let an applet indicate that it doesn't want to put data into the input buffer */
+static inline void si_applet_stop_put(struct stream_interface *si)
+{
+ si->flags &= ~SI_FL_WANT_PUT;
+}
+
+/* let an applet indicate that it wants to get some data from the output buffer */
+static inline void si_applet_want_get(struct stream_interface *si)
+{
+ si->flags |= SI_FL_WANT_GET;
+}
+
+/* let an applet indicate that it wanted to get some data from the output buffer
+ * but it couldn't.
+ */
+static inline void si_applet_cant_get(struct stream_interface *si)
+{
+ si->flags |= SI_FL_WANT_GET | SI_FL_WAIT_DATA;
+}
+
+/* let an applet indicate that it doesn't want to get data from the input buffer */
+static inline void si_applet_stop_get(struct stream_interface *si)
+{
+ si->flags &= ~SI_FL_WANT_GET;
+}
+
/* Try to allocate a new connection and assign it to the interface. If
* a connection was previously allocated and the <reuse> flag is set,
* it is returned unmodified. Otherwise it is reset.
SI_FL_NOLINGER = 0x0080, /* may close without lingering. One-shot. */
SI_FL_NOHALF = 0x0100, /* no half close, close both sides at once */
SI_FL_SRC_ADDR = 0x1000, /* get the source ip/port with getsockname */
+ SI_FL_WANT_PUT = 0x2000, /* an applet would like to put some data into the buffer */
+ SI_FL_WANT_GET = 0x4000, /* an applet would like to get some data from the buffer */
};
/* A stream interface has 3 parts :