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
15a0d819
Commit
15a0d819
authored
Aug 16, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MG_SHUTDOWN event
parent
6add727c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
mongoose.c
mongoose.c
+1
-0
mongoose.h
mongoose.h
+2
-1
No files found.
mongoose.c
View file @
15a0d819
...
@@ -4303,6 +4303,7 @@ static void free_context(struct mg_context *ctx) {
...
@@ -4303,6 +4303,7 @@ static void free_context(struct mg_context *ctx) {
}
}
void
mg_stop
(
struct
mg_context
*
ctx
)
{
void
mg_stop
(
struct
mg_context
*
ctx
)
{
call_user
(
fc
(
ctx
),
MG_SHUTDOWN
);
ctx
->
stop_flag
=
1
;
ctx
->
stop_flag
=
1
;
// Wait until mg_fini() stops
// Wait until mg_fini() stops
...
...
mongoose.h
View file @
15a0d819
...
@@ -59,7 +59,8 @@ enum mg_event {
...
@@ -59,7 +59,8 @@ enum mg_event {
MG_EVENT_LOG
,
// Mongoose logs an event, request_info.log_message
MG_EVENT_LOG
,
// Mongoose logs an event, request_info.log_message
MG_INIT_SSL
,
// Mongoose initializes SSL. Instead of mg_connection *,
MG_INIT_SSL
,
// Mongoose initializes SSL. Instead of mg_connection *,
// SSL context is passed to the callback function.
// SSL context is passed to the callback function.
MG_REQUEST_COMPLETE
// Mongoose has finished handling the request
MG_REQUEST_COMPLETE
,
// Mongoose has finished handling the request
MG_SHUTDOWN
// Called when Mongoose stops, request_info is empty.
};
};
// Prototype for the user-defined function. Mongoose calls this function
// Prototype for the user-defined function. Mongoose calls this function
...
...
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