X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp.h;fp=src%2Fhttp.h;h=e075e0c6e811d75f604a841a1e620befab6715d4;hb=284649ed257354c2fcb2f2a6c78cf5fd7cf2283d;hp=2a5d1fe9f10df6d7c5df206766870a68d5966cbf;hpb=e356b466f900722adf6c4f13588e2bed05555134;p=pazpar2-moved-to-github.git diff --git a/src/http.h b/src/http.h index 2a5d1fe..e075e0c 100644 --- a/src/http.h +++ b/src/http.h @@ -22,17 +22,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "eventl.h" // Generic I/O buffer -struct http_buf -{ -#define HTTP_BUF_SIZE 4096 - char buf[4096]; - int offset; - int len; - struct http_buf *next; -}; - +struct http_buf; typedef struct http_channel_observer_s *http_channel_observer_t; +typedef struct http_server *http_server_t; + struct http_channel { IOCHAN iochan; @@ -54,6 +48,7 @@ struct http_channel char addr[20]; // forwarded address http_channel_observer_t observers; struct conf_server *server; + http_server_t http_server; }; struct http_proxy // attached to iochan for proxy connection @@ -101,6 +96,9 @@ struct http_response char *content_type; }; +void http_mutex_init(struct conf_server *server); +void http_server_destroy(http_server_t hs); + void http_set_proxyaddr(const char *url, struct conf_server *ser); int http_init(const char *addr, struct conf_server *ser); void http_close_server(struct conf_server *ser);