MAJOR: make use of conn_{data|sock}_{poll|stop|want}* in connection handlers
This is a second attempt at getting rid of FD_WAIT_*. Now the situation is
much better since native I/O handlers can directly manipulate the FD using
fd_{poll|want|stop}_* and the connection handlers manipulate connection-level
flags using the conn_{data|sock}_* equivalent.
Proceeding this way ensures that the connection flags always reflect the
reality even after data<->handshake switches.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index 6bef475..2ecdfd3 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -26,7 +26,7 @@
#include <types/connection.h>
/* I/O callback for fd-based connections. It calls the read/write handlers
- * provided by the connection's sock_ops. Returns FD_WAIT_*.
+ * provided by the connection's sock_ops. Returns 0.
*/
int conn_fd_handler(int fd);
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 20787e8..6fbf94d 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -114,8 +114,8 @@
void (*shutw)(struct connection *, int); /* shutw function */
void (*chk_rcv)(struct stream_interface *); /* chk_rcv function */
void (*chk_snd)(struct stream_interface *); /* chk_snd function */
- int (*read)(struct connection *conn); /* read callback after poll() */
- int (*write)(struct connection *conn); /* write callback after poll() */
+ void (*read)(struct connection *conn); /* read callback after poll() */
+ void (*write)(struct connection *conn); /* write callback after poll() */
void (*close)(struct connection *); /* close the data channel on the connection */
};