server 0.0.1
basicserverinfrastructure

include/http/request_parser.h

Go to the documentation of this file.
00001 #ifndef __HTTP_REQUEST_PARSER_H__
00002 #define __HTTP_REQUEST_PARSER_H__
00003 
00004 #include "class.h"
00005 #include "http/request_queue.h"
00006 
00007 #define HTTP_REQUEST_PARSER_READ_CHUNK  1024
00008 
00009 typedef enum e_HttpRequestState {
00010         HTTP_REQUEST_GARBAGE=0,
00011         HTTP_REQUEST_START,
00012         HTTP_REQUEST_REQUEST_LINE_DONE,
00013         HTTP_REQUEST_HEADERS_DONE,
00014         HTTP_REQUEST_DONE
00015 } HttpRequestState;
00016 
00017 
00018 CLASS(HttpRequestParser) {
00019         char *           buffer;
00020         size_t           buffer_used;
00021         size_t           buffer_size;
00022 
00023         HttpRequestQueue request_queue;
00024         HttpRequestState state;
00025 };
00026 
00027 #endif /* __HTTP_REQUEST_PARSER_H__ */
00028 
00029 // vim: set ts=4 sw=4:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines