Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
72abaa04
Commit
72abaa04
authored
12 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Documented struct mg_callbacks
parent
b3a511f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongoose.h
+23
-1
23 additions, 1 deletion
mongoose.h
with
23 additions
and
1 deletion
mongoose.h
+
23
−
1
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment