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
60674c11
Commit
60674c11
authored
Mar 13, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API docs regarding MG_POLL changed
parent
91c9ab80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
API.md
docs/API.md
+6
-6
No files found.
docs/API.md
View file @
60674c11
...
...
@@ -71,16 +71,16 @@ occur. Sequence of events for the accepted connection is this:
certain prefix, and let Mongoose serve all static files.
If event handler decides to serve the request, but doesn't have
all the data at the moment, it should return
`MG_MORE`
. That tells
Mongoose to
send
`MG_POLL`
events on each iteration of
`mg_poll_server()`
Mongoose to
keep the connection open after callback returns.
`mg_connection::connection_param` pointer is a placeholder to keep
user-specific data. For example, handler could decide to open a DB
connection and store DB connection handle in `connection_param`.
*
`MG_POLL`
is sent
only to those connections which returned
`MG_MORE`
.
Event handler should try to complete the reply. If reply is completed,
th
en event handler should return
`MG_TRUE`
. Otherwise, it should
return
`MG_FALSE`
, and polling will continue unti
l
handler returns
`MG_TRUE`
.
*
`MG_POLL`
is sent
to every connection on every iteration of
`mg_poll_server()`
. Event handler should return
`MG_FALSE`
to ignore
th
is event. If event handler returns
`MG_TRUE`
, then Mongoose assumes
that event handler has finished sending data, and Mongoose wil
l
close the connection
.
*
`MG_HTTP_ERROR`
sent when Mongoose is about to send HTTP error back
to the client. Event handler can choose to send a reply itself, in which
case event handler must return
`MG_TRUE`
. Otherwise, event handler must
...
...
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