3 Plugins are extra features which modifies the Monkey behavior, all of them
4 are shared libraries which are loaded on runtime.
6 Each plugin is loaded per configuration instruction and it will work on a
7 defined stage or event. Monkey has different cycles since a connection is
8 accepted until it's finished. Stages are defined as follows:
10 MK_PLUGIN_STAGE_10: Server has not yet entered in the server loop, no
11 listeners yet available
12 ---------------------------------------------------------------------
16 MK_PLUGIN_STAGE_20: Accepted connection has not been assigned to worker thread
17 ------------------------------------------------------------------------------
20 * MK_PLUGIN_RET_CLOSE_CONX: The connection must be closed.
23 MK_PLUGIN_STAGE_30: HTTP Request received
24 -----------------------------------------
26 * MK_PLUGIN_RET_CLOSE_CONX: The connection must be closed.
29 MK_PLUGIN_STAGE_40: Object Handler
30 -----------------------------------------
32 * _mk_plugin_stage_40_loop(): if _mk_plugin_stage_40() has
33 returned MK_PLUGIN_RET_CONTINUE, the server will wait
34 for an event and call _mk_plugin_stage_40() until it
35 returns MK_PLUGIN_RET_END.
39 * MK_PLUGIN_RET_CONTINUE
42 * MK_PLUGIN_RET_NOT_ME: Plugin will not handle this request.
44 * MK_PLUGIN_RET_END: Plugin has taken some action and
45 has finished the work, the handler will no take the request
48 * MK_PLUGIN_RET_CONTINUE:: Plugin has taken some action and
49 will continue in the next loop.
52 MK_PLUGIN_STAGE_50: Request ended
53 -----------------------------------------
56 MK_PLUGIN_STAGE_60: The Connection has been closed
57 --------------------------------------------------