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
72abaa04
Commit
72abaa04
authored
Mar 09, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documented struct mg_callbacks
parent
b3a511f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
mongoose.h
mongoose.h
+23
-1
No files found.
mongoose.h
View file @
72abaa04
...
...
@@ -56,13 +56,35 @@ struct mg_request_info {
// which callbacks to invoke. For detailed description, see
// https://github.com/valenok/mongoose/blob/master/UserManual.md
struct
mg_callbacks
{
// Called when mongoose has received new HTTP request.
// If callback returns non-zero,
// callback must process the request by sending valid HTTP headers and body,
// and mongoose will not do any further processing.
// If callback returns 0, mongoose processes the request itself. In this case,
// callback must not send any data to the client.
int
(
*
begin_request
)(
struct
mg_connection
*
);
// Called when mongoose has finished processing request.
void
(
*
end_request
)(
const
struct
mg_connection
*
,
int
reply_status_code
);
// Called when mongoose is about to log a message. If callback returns
// non-zero, mongoose does not log anything.
int
(
*
log_message
)(
const
struct
mg_connection
*
,
const
char
*
message
);
// Called when mongoose initializes SSL library.
int
(
*
init_ssl
)(
void
*
ssl_context
,
void
*
user_data
);
// Called when websocket request is received, before websocket handshake.
// If callback returns 0, mongoose proceeds with handshake, otherwise
// cinnection is closed immediately.
int
(
*
websocket_connect
)(
const
struct
mg_connection
*
);
// Called when websocket handshake is successfully completed, and
// connection is ready for data exchange.
void
(
*
websocket_ready
)(
struct
mg_connection
*
);
int
(
*
websocket_data
)(
struct
mg_connection
*
,
int
flags
,
// Called when data frame has been received from the client.
int
(
*
websocket_data
)(
struct
mg_connection
*
,
int
bits
,
char
*
data
,
size_t
data_len
);
const
char
*
(
*
open_file
)(
const
struct
mg_connection
*
,
const
char
*
path
,
size_t
*
data_len
);
...
...
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