You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
655 B
37 lines
655 B
#ifndef __HTTP_WORKER_H__
|
|
#define __HTTP_WORKER_H__
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "class.h"
|
|
#include "http/request/parser.h"
|
|
#include "http/response/writer.h"
|
|
#include "cbuf.h"
|
|
|
|
#define RESPONSE_WRITER_MAX_BUF 131072
|
|
#define REQUEST_PARSER_BUFFER_MAX 8192
|
|
|
|
#ifndef TRUE
|
|
#define TRUE ((void *)1)
|
|
#endif
|
|
|
|
#ifndef FALSE
|
|
#define FALSE ((void *)0)
|
|
#endif
|
|
|
|
CLASS(HttpWorker) {
|
|
char * id;
|
|
|
|
Cbuf pbuf;
|
|
Cbuf wbuf;
|
|
|
|
HttpRequestParser parser;
|
|
HttpResponseWriter writer;
|
|
};
|
|
|
|
ssize_t httpWorkerProcess(HttpWorker, int);
|
|
ssize_t httpWorkerWrite(HttpWorker, int);
|
|
|
|
#endif // __HTTP_WORKER_H__
|
|
|
|
// vim: set ts=4 sw=4:
|