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
1ef29c1b
Commit
1ef29c1b
authored
Aug 14, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using #define MGSQLEN for the socket queue length
parent
e95dbb90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
mongoose.c
mongoose.c
+6
-1
No files found.
mongoose.c
View file @
1ef29c1b
...
@@ -304,6 +304,11 @@ typedef int socklen_t;
...
@@ -304,6 +304,11 @@ typedef int socklen_t;
#define PATH_MAX 4096
#define PATH_MAX 4096
#endif
#endif
// Size of the accepted socket queue
#if !defined(MGSQLEN)
#define MGSQLEN 20
#endif
static
const
char
*
http_500_error
=
"Internal Server Error"
;
static
const
char
*
http_500_error
=
"Internal Server Error"
;
#if defined(NO_SSL_DL)
#if defined(NO_SSL_DL)
...
@@ -494,7 +499,7 @@ struct mg_context {
...
@@ -494,7 +499,7 @@ struct mg_context {
pthread_mutex_t
mutex
;
// Protects (max|num)_threads
pthread_mutex_t
mutex
;
// Protects (max|num)_threads
pthread_cond_t
cond
;
// Condvar for tracking workers terminations
pthread_cond_t
cond
;
// Condvar for tracking workers terminations
struct
socket
queue
[
20
];
// Accepted sockets
struct
socket
queue
[
MGSQLEN
];
// Accepted sockets
volatile
int
sq_head
;
// Head of the socket queue
volatile
int
sq_head
;
// Head of the socket queue
volatile
int
sq_tail
;
// Tail of the socket queue
volatile
int
sq_tail
;
// Tail of the socket queue
pthread_cond_t
sq_full
;
// Signaled when socket is produced
pthread_cond_t
sq_full
;
// Signaled when socket is produced
...
...
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