Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
b30e1893
Commit
b30e1893
authored
Aug 28, 2011
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better documentation
parent
48869499
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
mongoose.h
mongoose.h
+7
-7
No files found.
mongoose.h
View file @
b30e1893
...
@@ -37,12 +37,12 @@ struct mg_request_info {
...
@@ -37,12 +37,12 @@ struct mg_request_info {
char
*
request_method
;
// "GET", "POST", etc
char
*
request_method
;
// "GET", "POST", etc
char
*
uri
;
// URL-decoded URI
char
*
uri
;
// URL-decoded URI
char
*
http_version
;
// E.g. "1.0", "1.1"
char
*
http_version
;
// E.g. "1.0", "1.1"
char
*
query_string
;
//
\0 - terminated
char
*
query_string
;
//
URL part after '?' (not including '?') or NULL
char
*
remote_user
;
// Authenticated user
char
*
remote_user
;
// Authenticated user
, or NULL if no auth used
char
*
log_message
;
// Mongoose error log message
char
*
log_message
;
// Mongoose error log message
, MG_EVENT_LOG only
long
remote_ip
;
// Client's IP address
long
remote_ip
;
// Client's IP address
int
remote_port
;
// Client's port
int
remote_port
;
// Client's port
int
status_code
;
// HTTP reply status code
int
status_code
;
// HTTP reply status code
, e.g. 200
int
is_ssl
;
// 1 if SSL-ed, 0 if not
int
is_ssl
;
// 1 if SSL-ed, 0 if not
int
num_headers
;
// Number of headers
int
num_headers
;
// Number of headers
struct
mg_header
{
struct
mg_header
{
...
@@ -61,19 +61,19 @@ enum mg_event {
...
@@ -61,19 +61,19 @@ enum mg_event {
};
};
// Prototype for the user-defined function. Mongoose calls this function
// Prototype for the user-defined function. Mongoose calls this function
// on every
event mentioned above
.
// on every
MG_* event
.
//
//
// Parameters:
// Parameters:
// event: which event has been triggered.
// event: which event has been triggered.
// conn: opaque connection handler. Could be used to read, write data to the
// conn: opaque connection handler. Could be used to read, write data to the
// client, etc. See functions below that
accept "mg_connection *"
.
// client, etc. See functions below that
have "mg_connection *" arg
.
// request_info: Information about HTTP request.
// request_info: Information about HTTP request.
//
//
// Return:
// Return:
// If handler returns non-NULL, that means that handler has processed the
// If handler returns non-NULL, that means that handler has processed the
// request by sending appropriate HTTP reply to the client. Mongoose treats
// request by sending appropriate HTTP reply to the client. Mongoose treats
// the request as served.
// the request as served.
// If
callback returns NULL, that means that callback
has not processed
// If
handler returns NULL, that means that handler
has not processed
// the request. Handler must not send any data to the client in this case.
// the request. Handler must not send any data to the client in this case.
// Mongoose proceeds with request handling as if nothing happened.
// Mongoose proceeds with request handling as if nothing happened.
typedef
void
*
(
*
mg_callback_t
)(
enum
mg_event
event
,
typedef
void
*
(
*
mg_callback_t
)(
enum
mg_event
event
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment