[MEDIUM] stream_interface: add and use ->update function to resync
We used to call stream_sock_data_finish() directly at the end of
a session update, but if we want to support non-socket interfaces,
we need to have this function configurable. Now we access it via
->update().
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 7789323..c9b0e55 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -82,12 +82,13 @@
int fd; /* file descriptor for a stream driver when known */
unsigned int flags;
unsigned int exp; /* wake up time for connect, queue, turn-around, ... */
- int (*connect)(struct stream_interface *, struct proxy *, struct server *,
- struct sockaddr *, struct sockaddr *); /* connect function if any */
+ void (*update)(struct stream_interface *); /* update function */
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 */
+ int (*connect)(struct stream_interface *, struct proxy *, struct server *,
+ struct sockaddr *, struct sockaddr *); /* connect function if any */
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 */