Incremental work.
[doldaconnect.git] / include / http.h
index 0456d5a..e6d1020 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef _HTTP_H
 #define _HTTP_H
 
+#include <netdb.h>
+
 struct hturlinfo {
     char *host;
     int port;
@@ -28,7 +30,9 @@ struct hturlinfo {
 };
 
 struct htconn {
+    int state;
     int fd;
+    struct addrinfo *ailist, *curai;
     char *outbuf, *inbuf;
     size_t outbufsize, outbufdata;
     size_t inbufsize, inbufdata;
@@ -40,4 +44,9 @@ struct htcookie {
     char *name, *val;
 };
 
+struct hturlinfo *parseurl(char *url);
+void freeurl(struct hturlinfo *ui);
+struct htconn *htconnect(struct hturlinfo *ui);
+int htpollflags(struct htconn *hc);
+
 #endif