struct http_buf *oqueue;
char version[10];
struct http_proxy *proxy;
+ enum
+ {
+ Http_Idle,
+ Http_Busy // Don't process new HTTP requests while we're busy
+ } state;
NMEM nmem;
WRBUF wrbuf;
+ struct http_request *request;
+ struct http_response *response;
+ struct http_channel *next; // for freelist
};
struct http_proxy // attached to iochan for proxy connection
};
void http_set_proxyaddr(char *url);
-void http_init(int port);
+void http_init(const char *addr);
void http_addheader(struct http_response *r, const char *name, const char *value);
char *http_argbyname(struct http_request *r, char *name);
char *http_headerbyname(struct http_request *r, char *name);
struct http_response *http_create_response(struct http_channel *c);
+void http_send_response(struct http_channel *c);
/*
* Local variables: