X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=include%2Fhttp.h;fp=include%2Fhttp.h;h=e3cc1d4ca4b9cd145ce9e07c7290e74b1ee84900;hb=2b6703ac37a2c0f17923535d68fdf0ac2debedea;hp=8223be33d31821676b720159a685edaffbf20fca;hpb=ba087e49b7b7e8f644b9fd59e4ea330d8566bb3d;p=doldaconnect.git diff --git a/include/http.h b/include/http.h index 8223be3..e3cc1d4 100644 --- a/include/http.h +++ b/include/http.h @@ -22,6 +22,8 @@ #include +#include "utils.h" + struct hturlinfo { char *host; int port; @@ -34,10 +36,15 @@ struct htconn { int state; int fd; struct addrinfo *ailist, *curai; - char *outbuf, *inbuf; + char *outbuf, *inbuf, *databuf; size_t outbufsize, outbufdata; size_t inbufsize, inbufdata; + size_t databufsize, databufdata; struct hturlinfo *url; + int rescode; + char *resstr; + struct strpair *headers; + ssize_t tlen, rxd, chl; }; struct htcookie { @@ -47,7 +54,9 @@ struct htcookie { struct hturlinfo *parseurl(char *url); void freeurl(struct hturlinfo *ui); +void freehtconn(struct htconn *cn); struct htconn *htconnect(struct hturlinfo *ui); int htpollflags(struct htconn *hc); +int htprocess(struct htconn *hc, int pollflags); #endif