blob: 756c45a756357d9191488c3d9b8e3747be070b0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#pragma once
#include "http.h"
typedef enum Handler_ret_t{
HR_HANDLED,
HR_NEXT,
HR_ERROR,
} Handler_ret_t;
typedef Handler_ret_t (*Handler)(int sock,Headers *headers);
typedef void (*register_callback_t)(const char *name,Handler handler);
// Override this in the plugin; it will be called from the main application.
// It should call the callback with the plugin's handler.
// Note that the plugin's handler will be called from multiple threads, so ensure that it is thread-safe.
void plugin_register_yourself(register_callback_t callback);
|