Send request data to multiplexer.
[ashd.git] / lib / req.h
CommitLineData
33733396
FT
1#ifndef _LIB_HTREQ_H
2#define _LIB_HTREQ_H
3
41213112
FT
4struct hthead {
5 char *method, *url, *ver, *msg;
6 int code;
7 char *rest;
33733396
FT
8 char ***headers;
9 int noheaders;
10};
11
41213112
FT
12struct hthead *mkreq(char *method, char *url, char *ver);
13struct hthead *mkresp(int code, char *msg, char *ver);
14void freehthead(struct hthead *head);
15char *getheader(struct hthead *head, char *name);
16void headpreheader(struct hthead *head, const char *name, const char *val);
17void headappheader(struct hthead *head, const char *name, const char *val);
18int sendreq(int sock, struct hthead *req);
19int recvreq(int sock, struct hthead **reqp);
33733396
FT
20
21#endif