Browse Source
fixed the non keep-alive performance issue as well as i lower memory usage by using a single read and write circular buffer for every connection. @TODO: i noticed a server hang while getting large data (my image) with non keep-alive connections. Additionally an incomplete keep-alive request might stop the server now as the lock on the read buffer will not be released.
master
fixed the non keep-alive performance issue as well as i lower memory usage by using a single read and write circular buffer for every connection. @TODO: i noticed a server hang while getting large data (my image) with non keep-alive connections. Additionally an incomplete keep-alive request might stop the server now as the lock on the read buffer will not be released.
master
17 changed files with 158 additions and 62 deletions
-
11include/cbuf.h
-
20include/http/request/parser.h
-
9include/http/response/writer.h
-
15include/http/worker.h
-
2src/Makefile.am
-
2src/cbuf/get_data.c
-
9src/cbuf/is_locked.c
-
9src/cbuf/lock.c
-
9src/cbuf/release.c
-
2src/cbuf/set_data.c
-
10src/http/request/parser.c
-
22src/http/request/parser/parse.c
-
21src/http/response/writer.c
-
17src/http/response/writer/write.c
-
38src/http/worker.c
-
18src/server/handle_accept.c
-
6src/testserver.c
@ -0,0 +1,9 @@ |
|||
#include "cbuf.h" |
|||
|
|||
void * |
|||
cbufIsLocked(Cbuf this) |
|||
{ |
|||
return this->lock; |
|||
} |
|||
|
|||
// vim: set ts=4 sw=4: |
|||
@ -0,0 +1,9 @@ |
|||
#include "cbuf.h" |
|||
|
|||
void |
|||
cbufLock(Cbuf this) |
|||
{ |
|||
this->lock = TRUE; |
|||
} |
|||
|
|||
// vim: set ts=4 sw=4: |
|||
@ -0,0 +1,9 @@ |
|||
#include "cbuf.h" |
|||
|
|||
void |
|||
cbufRelease(Cbuf this) |
|||
{ |
|||
this->lock = FALSE; |
|||
} |
|||
|
|||
// vim: set ts=4 sw=4: |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue