File tree 2 files changed +16
-10
lines changed
samples/net/sockets/civetweb
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ CONFIG_NET_IPV4=y
13
13
# CONFIG_NET_IPV6 is not set
14
14
CONFIG_NET_TCP=y
15
15
CONFIG_NET_SOCKETS=y
16
- CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=131072
17
- CONFIG_NET_TX_STACK_SIZE=8192
18
- CONFIG_NET_RX_STACK_SIZE=8192
19
- CONFIG_ISR_STACK_SIZE=8192
20
- CONFIG_MAIN_STACK_SIZE=8192
21
- CONFIG_IDLE_STACK_SIZE=2048
16
+ CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=16384
17
+ CONFIG_NET_TX_STACK_SIZE=2048
18
+ CONFIG_NET_RX_STACK_SIZE=2048
19
+ CONFIG_ISR_STACK_SIZE=2048
20
+ CONFIG_MAIN_STACK_SIZE=2048
21
+ CONFIG_IDLE_STACK_SIZE=1024
22
22
23
23
CONFIG_DNS_RESOLVER=y
24
24
Original file line number Diff line number Diff line change 10
10
11
11
#include "civetweb.h"
12
12
13
- #define CIVETWEB_MAIN_THREAD_STACK_SIZE 4096
13
+ #define HTTP_PORT 8080
14
+ #define HTTPS_PORT 4443
15
+
16
+ #define CIVETWEB_MAIN_THREAD_STACK_SIZE CONFIG_MAIN_STACK_SIZE
17
+
18
+ /* Use samllest possible value of 1024 (see the line 18619 of civetweb.c) */
19
+ #define MAX_REQUEST_SIZE_BYTES 1024
14
20
15
21
K_THREAD_STACK_DEFINE (civetweb_stack , CIVETWEB_MAIN_THREAD_STACK_SIZE );
16
22
@@ -139,12 +145,12 @@ void *main_pthread(void *arg)
139
145
{
140
146
static const char * const options [] = {
141
147
"listening_ports" ,
142
- "8080" ,
148
+ STRINGIFY ( HTTP_PORT ) ,
143
149
"num_threads" ,
144
150
"1" ,
145
151
"max_request_size" ,
146
- "2048" ,
147
- 0
152
+ STRINGIFY ( MAX_REQUEST_SIZE_BYTES ) ,
153
+ NULL
148
154
};
149
155
150
156
struct mg_callbacks callbacks ;
You can’t perform that action at this time.
0 commit comments