19 #ifndef GRPC_CORE_LIB_HTTP_PARSER_H
20 #define GRPC_CORE_LIB_HTTP_PARSER_H
29 #define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH 4096
100 void* request_or_response);
106 size_t* start_of_body);
grpc_http_parser_state
Definition: parser.h:37
@ GRPC_HTTP_BODY
Definition: parser.h:40
@ GRPC_HTTP_FIRST_LINE
Definition: parser.h:38
@ GRPC_HTTP_HEADERS
Definition: parser.h:39
#define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH
Definition: parser.h:29
void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, void *request_or_response)
struct grpc_http_header grpc_http_header
grpc_http_type
Definition: parser.h:49
@ GRPC_HTTP_RESPONSE
Definition: parser.h:50
@ GRPC_HTTP_REQUEST
Definition: parser.h:51
void grpc_http_request_destroy(grpc_http_request *request)
struct grpc_http_response grpc_http_response
grpc_http_version
Definition: parser.h:43
@ GRPC_HTTP_HTTP11
Definition: parser.h:45
@ GRPC_HTTP_HTTP20
Definition: parser.h:46
@ GRPC_HTTP_HTTP10
Definition: parser.h:44
void grpc_http_response_destroy(grpc_http_response *response)
void grpc_http_parser_destroy(grpc_http_parser *parser)
grpc_error * grpc_http_parser_eof(grpc_http_parser *parser)
grpc_error * grpc_http_parser_parse(grpc_http_parser *parser, const grpc_slice &slice, size_t *start_of_body)
struct grpc_http_request grpc_http_request
grpc_core::TraceFlag grpc_http1_trace
Definition: error_internal.h:39
grpc_http_response * response
Definition: parser.h:87
size_t body_capacity
Definition: parser.h:91
grpc_http_type type
Definition: parser.h:84
void * request_or_response
Definition: parser.h:89
grpc_http_parser_state state
Definition: parser.h:83
size_t hdr_capacity
Definition: parser.h:92
grpc_http_request * request
Definition: parser.h:88
size_t cur_line_length
Definition: parser.h:95
size_t cur_line_end_length
Definition: parser.h:96
size_t body_length
Definition: parser.h:66
char * method
Definition: parser.h:57
grpc_http_version version
Definition: parser.h:61
grpc_http_header * hdrs
Definition: parser.h:64
size_t hdr_count
Definition: parser.h:63
char * body
Definition: parser.h:67
char * path
Definition: parser.h:59
grpc_http_header * hdrs
Definition: parser.h:76
int status
Definition: parser.h:73
size_t hdr_count
Definition: parser.h:75
size_t body_length
Definition: parser.h:78
char * body
Definition: parser.h:79
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60