X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Freq.h;h=9ae60ab4ef1a568bde61bc47b6d04d346b65767f;hb=4350acb522111f385f74dd9c7f8b3e47443ff225;hp=752ff776f549a52fab34b40915164b17dadfaa01;hpb=f89ce57a7d216566b30c22f8f8accc9ab0eb5c6c;p=ashd.git diff --git a/lib/req.h b/lib/req.h index 752ff77..9ae60ab 100644 --- a/lib/req.h +++ b/lib/req.h @@ -3,6 +3,8 @@ #include +struct bufio; + struct hthead { char *method, *url, *ver, *msg; int code; @@ -18,11 +20,16 @@ char *getheader(struct hthead *head, char *name); void headpreheader(struct hthead *head, const char *name, const char *val); void headappheader(struct hthead *head, const char *name, const char *val); void headrmheader(struct hthead *head, const char *name); +int sendreq2(int sock, struct hthead *req, int fd, int flags); int sendreq(int sock, struct hthead *req, int fd); int recvreq(int sock, struct hthead **reqp); void replrest(struct hthead *head, char *rest); int parseheaders(struct hthead *head, FILE *in); +int parseheadersb(struct hthead *head, struct bufio *in); +struct hthead *parseresponse(FILE *in); +struct hthead *parseresponseb(struct bufio *in); int writeresp(FILE *out, struct hthead *resp); +int writerespb(struct bufio *out, struct hthead *resp); char *unquoteurl(char *in); #endif