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
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
d4ac96c2
Commit
d4ac96c2
authored
11 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Some wording/spelling changes
parent
0612129a
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
docs/API.md
+10
-7
10 additions, 7 deletions
docs/API.md
with
10 additions
and
7 deletions
docs/API.md
+
10
−
7
View file @
d4ac96c2
...
...
@@ -22,7 +22,7 @@ Important: Mongoose does not install `SIGCHLD` handler. If CGI is used,
void mg_destroy_server(struct mg_server **server);
Deallocates web server instance, closes all pending connections, and makes
a
server pointer a NULL pointer.
server pointer a NULL pointer.
const char mg_set_option(struct mg_server *server, const char *name,
const char *value);
...
...
@@ -30,16 +30,17 @@ a server pointer a NULL pointer.
Sets a particular server option. Please refer to a separate documentation page
that lists all available option names. Note that at least one option,
`listening_port`
, must be specified. To serve static files,
`document_root`
needs to
be specified too. If
`document_root`
option is left unset, Mongoose
must
be specified too. If
`document_root`
option is left unset, Mongoose
will not access filesystem at all. This function returns NULL if option was
set successfully, otherwise it returns human-readable error string. It is
allowed to call
`mg_set_option()`
by the same thread that does
`mg_poll_server()`
(an IO thread).
`mg_poll_server()`
(an IO thread) and change server configuration while it
is serving, in between
`mg_poll_server()`
calls.
void mg_poll_server(struct mg_server *server, int milliseconds);
This function performs one iteration of IO loop
. Mongoose
iterat
es
over all
active connections,
and
perform
s a
`select()`
syscall on all sockets, sleeping
This function performs one iteration of IO loop
by
iterat
ing
over all
active connections, perform
ing
`select()`
syscall on all sockets,
and
sleeping
for
`milliseconds`
number of milliseconds. When
`select()`
returns, Mongoose
does an IO for each socket that has data to be sent or received. Application
code must call
`mg_poll_server()`
in a loop. It is an error to have more then
...
...
@@ -64,8 +65,10 @@ with sending HTTP error to the client. Otherwise, mongoose does nothing.
const char **mg_get_valid_option_names(void);
Returns a NULL-terminated array of option names and their default values,
so two entries per option.
Returns a NULL-terminated array of option names and their default values.
There are two entries per option in an array: an option name followed by a
default value. A default value could be NULL. A NULL name indicates an end
of the array.
const char *mg_get_option(const struct mg_server *server, const char *name);
...
...
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