mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-23 20:11:49 +00:00
Changing API: callback doesnt get mg_request_info pointer anymore, but it is possible to get it using mg_get_request_info()
This commit is contained in:
1 parent
e8f3132aa8
commit
0e0091e1c0
6 files changed
+24
-17
No files matched your search
+7
-3
@@ -68,7 +68,6 @@ enum mg_event {
|
||||
// event: which event has been triggered.
|
||||
// conn: opaque connection handler. Could be used to read, write data to the
|
||||
// client, etc. See functions below that have "mg_connection *" arg.
|
||||
// request_info: Information about HTTP request.
|
||||
//
|
||||
// Return:
|
||||
// If handler returns non-NULL, that means that handler has processed the
|
||||
@@ -78,8 +77,7 @@ enum mg_event {
|
||||
// the request. Handler must not send any data to the client in this case.
|
||||
// Mongoose proceeds with request handling as if nothing happened.
|
||||
typedef void * (*mg_callback_t)(enum mg_event event,
|
||||
struct mg_connection *conn,
|
||||
const struct mg_request_info *request_info);
|
||||
struct mg_connection *conn);
|
||||
|
||||
|
||||
// Start web server.
|
||||
@@ -151,6 +149,12 @@ int mg_modify_passwords_file(const char *passwords_file_name,
|
||||
const char *user,
|
||||
const char *password);
|
||||
|
||||
|
||||
// Return mg_request_info structure associated with the request.
|
||||
// Always succeeds.
|
||||
const struct mg_request_info *mg_get_request_info(struct mg_connection *);
|
||||
|
||||
|
||||
// Send data to the client.
|
||||
int mg_write(struct mg_connection *, const void *buf, size_t len);
|
||||
|
||||
|
||||
Reference in new issue
Block a user