Add build option V7_NO_COMPILER

Which disables tokenizer, parser, AST, and compiler. On ESP8266, it
frees 21K of ROM.

PUBLISHED_FROM=ff4c53ace6b9056c595b9e12ef3453330d659775
This commit is contained in:
Dmitry Frank authored and Cesanta Bot committed 2016-07-21 13:51:54 +00:00
1 parent 2c83a50a8a
commit 1f75081f6e
2 files changed
+20 -20

No files matched your search

+6 -6
View File
@@ -3,8 +3,8 @@ title: Event handler function
---
Each connection has an event handler function associated with it. That function
must be implemented by user. Event handler is the key element of the Mongoose
application, since it defines application's behavior. This is how an event
must be implemented by the user. Event handler is the key element of the Mongoose
application, since it defines the application's behaviour. This is how an event
handler function looks like:
```c
@@ -18,14 +18,14 @@ static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
- `struct mg_connection *nc`: Connection that has received an event.
- `int ev`: Event number, defined in `mongoose.h`. For example, when data
arrives on inbound connection `ev` would be `MG_EV_RECV`.
arrives on an inbound connection, `ev` would be `MG_EV_RECV`.
- `void *ev_data`: This pointer points to the event-specific data, and it has
different meaning for different events. For example, for `MG_EV_RECV` event,
a different meaning for different events. For example, for an `MG_EV_RECV` event,
`ev_data` is an `int *` pointer, pointing to the number of bytes received
from the remote peer and saved into the receive IO buffer. Exact meaning of
from the remote peer and saved into the receive IO buffer. The exact meaning of
`ev_data` is described for each event. Protocol-specific events usually have
`ev_data` pointing to structures that hold protocol-specific information.
NOTE: `struct mg_connection` has `void *user_data` which is a placeholder for
an application-specific data. Mongoose does not use that pointer. Event handler
application-specific data. Mongoose does not use that pointer. Event handler
can store any kind of information there.