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
and
there
.
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
c432b783
Commit
c432b783
authored
11 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Formatted example
parent
e0697683
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/Embed.md
+2
-2
2 additions, 2 deletions
docs/Embed.md
with
2 additions
and
2 deletions
docs/Embed.md
+
2
−
2
View file @
c432b783
...
@@ -15,9 +15,9 @@ Here's a minimal application `app.c` that embeds mongoose:
...
@@ -15,9 +15,9 @@ Here's a minimal application `app.c` that embeds mongoose:
#include "mongoose.h"
#include "mongoose.h"
int main(void) {
int main(void) {
struct mg_server *server = mg_create_server(NULL);
struct mg_server *server = mg_create_server(NULL);
mg_set_option(server, "document_root", "."); // Serve current directory
mg_set_option(server, "document_root", ".");
// Serve current directory
mg_set_option(server, "listening_port", "8080"); // Open port 8080
mg_set_option(server, "listening_port", "8080"); // Open port 8080
for (;;) mg_poll_server(server, 1000); // Infinite loop, Ctrl-C to stop
for (;;) mg_poll_server(server, 1000);
// Infinite loop, Ctrl-C to stop
mg_destroy_server(&server);
mg_destroy_server(&server);
return 0;
return 0;
}
}
...
...
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