[MEDIUM] enable inter-stream_interface wakeup calls

By letting the producer tell the consumer there is data to check,
and the consumer tell the producer there is some space left again,
we can cut in half the number of session wakeups.

This is also an important starting point for future splicing support.
diff --git a/include/proto/stream_sock.h b/include/proto/stream_sock.h
index a3fd992..929cb08 100644
--- a/include/proto/stream_sock.h
+++ b/include/proto/stream_sock.h
@@ -3,7 +3,7 @@
   This file contains client-side definitions.
 
   Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
-  
+
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation, version 2.1
@@ -36,6 +36,8 @@
 void stream_sock_data_finish(struct stream_interface *si);
 void stream_sock_shutr(struct stream_interface *si);
 void stream_sock_shutw(struct stream_interface *si);
+void stream_sock_chk_rcv(struct stream_interface *si);
+void stream_sock_chk_snd(struct stream_interface *si);
 
 
 /* This either returns the sockname or the original destination address. Code
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index d34cfa4..bb4a9e3 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -78,6 +78,8 @@
 	unsigned int exp;       /* wake up time for connect, queue, turn-around, ... */
 	void (*shutr)(struct stream_interface *);  /* shutr function */
 	void (*shutw)(struct stream_interface *);  /* shutw function */
+	void (*chk_rcv)(struct stream_interface *);/* chk_rcv function */
+	void (*chk_snd)(struct stream_interface *);/* chk_snd function */
 	struct buffer *ib, *ob; /* input and output buffers */
 	unsigned int err_type;  /* first error detected, one of SI_ET_* */
 	void *err_loc;          /* commonly the server, NULL when SI_ET_NONE */