1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
24
25
26
27
28
29
32
43
44
46
55
56
59
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#pragma once
#include <protocomm.h>
#define PROTOCOMM_HTTPD_DEFAULT_CONFIG() { \
.port = 80, \
.stack_size = 4096, \
.task_priority = tskIDLE_PRIORITY + 5, \
}{...}
#ifdef __cplusplus
extern "C" {
#endif
/* ... */
typedef struct {
uint16_t port;
/* ... */
size_t stack_size;
unsigned task_priority;
}{ ... } protocomm_http_server_config_t;
/* ... */
typedef union {
/* ... */
void *handle;
/* ... */
protocomm_http_server_config_t config;
}{ ... } protocomm_httpd_config_data_t;
/* ... */
typedef struct {
/* ... */
bool ext_handle_provided;
protocomm_httpd_config_data_t data;
}{ ... } protocomm_httpd_config_t;
/* ... */
esp_err_t protocomm_httpd_start(protocomm_t *pc, const protocomm_httpd_config_t *config);
/* ... */
esp_err_t protocomm_httpd_stop(protocomm_t *pc);
#ifdef __cplusplus
}{...}
#endif