1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| #ifndef BUSSERVER_H_
| #define BUSSERVER_H_
|
| #ifdef __cplusplus
| extern "C" {
| #endif
|
| struct bc_str {
| int len;
| const char *data;
| };
|
| #define BUSCLIENT_MAX_MULTIPART_OPT 20
|
| struct multipart {
| int n;
| // int capacity;
| struct bc_str part[BUSCLIENT_MAX_MULTIPART_OPT];
| };
|
| typedef void (*event_cb)(const char *topic, const char *topic_data, int data_len, void *user);
|
| void busserver_run(const char *addr, event_cb, void *user);
|
| int busserver_send_msg(const char *topic, const char *data);
|
| #ifdef __cplusplus
| }
| #endif
| #endif
|
|