writer.h
713 Bytes
#ifndef __HTTP_RESPONSE_WRITER_H__
#define __HTTP_RESPONSE_WRITER_H__
#include "class.h"
#include "http/response.h"
#include "http/message/queue.h"
typedef enum e_HttpResponseState {
HTTP_RESPONSE_NO=0,
HTTP_RESPONSE_START,
HTTP_RESPONSE_PIPE,
HTTP_RESPONSE_DONE
} HttpResponseState;
CLASS(HttpResponseWriter) {
char * buffer;
char pipe[1024];
size_t nbuffer;
size_t rpipe;
size_t wpipe;
char pipe_flip;
HttpMessageQueue response_queue;
HttpResponse cur_response;
HttpResponseState state;
};
HttpResponse httpResponseWriterWrite(HttpResponseWriter, int);
#endif // __HTTP_RESPONSE_WRITER_H__
// vim: set ts=4 sw=4: