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
7a77bb1c
Commit
7a77bb1c
authored
Dec 31, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More descriptive comment in multithreaded example
parent
4576b69e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
multi_threaded.c
examples/multi_threaded.c
+2
-1
mongoose.c
mongoose.c
+0
-2
No files found.
examples/multi_threaded.c
View file @
7a77bb1c
...
...
@@ -27,7 +27,8 @@ int main(void) {
mg_set_option
(
server1
,
"listening_port"
,
"8080"
);
mg_set_listening_socket
(
server2
,
mg_get_listening_socket
(
server1
));
// server1 goes to separate thread, server 2 runs in main thread
// server1 goes to separate thread, server 2 runs in main thread.
// IMPORTANT: NEVER LET DIFFERENT THREADS HANDLE THE SAME SERVER.
mg_start_thread
(
serve
,
server1
);
serve
(
server2
);
...
...
mongoose.c
View file @
7a77bb1c
...
...
@@ -950,8 +950,6 @@ static void sockaddr_to_string(char *buf, size_t len,
#endif
}
static
struct
connection
*
accept_new_connection
(
struct
mg_server
*
server
)
{
union
socket_address
sa
;
socklen_t
len
=
sizeof
(
sa
);
...
...
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