MEDIUM: stream_interface: derive the socket operations from the target
Instead of hard-coding sock_raw in connect_server(), we set this socket
operation at config parsing time. Right now, only servers and peers have
it. Proxies are still hard-coded as sock_raw. This will be needed for
future work on SSL which requires a different socket layer.
diff --git a/include/types/server.h b/include/types/server.h
index 31f036d..aa2c4f8 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -149,6 +149,8 @@
int bind_hdr_occ; /* occurrence number of header above: >0 = from first, <0 = from end, 0=disabled */
#endif
struct protocol *proto; /* server address protocol */
+ struct sock_ops *sock; /* server socket operations */
+ void *sock_init_arg; /* socket operations's opaque init argument if needed */
unsigned down_time; /* total time the server was down */
time_t last_change; /* last time, when the state was changed */
struct timeval check_start; /* last health check start time */