-extern int forwarded_connect(const struct forward_spec * fwd,
- struct http_request *http,
- struct client_state *csp);
+extern jb_socket forwarded_connect(const struct forward_spec * fwd,
+ struct http_request *http,
+ struct client_state *csp);
+#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+
+/*
+ * Default number of seconds after which an
+ * open connection will no longer be reused.
+ */
+#define DEFAULT_KEEP_ALIVE_TIMEOUT 180
+
+extern void set_keep_alive_timeout(unsigned int timeout);
+extern void initialize_reusable_connections(void);
+extern void forget_connection(jb_socket sfd);
+extern void remember_connection(jb_socket sfd,
+ const struct http_request *http,
+ const struct forward_spec *fwd,
+ unsigned int timeout);
+extern int close_unusable_connections(void);
+extern void mark_connection_closed(struct reusable_connection *closed_connection);
+extern int connection_destination_matches(const struct reusable_connection *connection,
+ const struct http_request *http,
+ const struct forward_spec *fwd);
+#endif /* FEATURE_CONNECTION_KEEP_ALIVE */
+
+
+/*
+ * Solaris fix
+ */
+#ifndef INADDR_NONE
+#define INADDR_NONE -1
+#endif