summaryrefslogtreecommitdiff
path: root/src/http_parser_adaptor.h
blob: 6d786bd09519b5d40705d1c9ff9fd012adb3d45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef SRC_HTTP_PARSER_ADAPTOR_H_
#define SRC_HTTP_PARSER_ADAPTOR_H_

#ifdef NODE_EXPERIMENTAL_HTTP
# include "llhttp.h"

typedef llhttp_type_t parser_type_t;
typedef llhttp_errno_t parser_errno_t;
typedef llhttp_settings_t parser_settings_t;
typedef llhttp_t parser_t;

#else  /* !NODE_EXPERIMENTAL_HTTP */
# include "http_parser.h"

typedef enum http_parser_type parser_type_t;
typedef enum http_errno parser_errno_t;
typedef http_parser_settings parser_settings_t;
typedef http_parser parser_t;

#define HPE_USER HPE_UNKNOWN

#endif  /* NODE_EXPERIMENTAL_HTTP */

#endif  /* SRC_HTTP_PARSER_ADAPTOR_H_ */