HTTPD_DEFAULT_CONFIG, overide settings

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

HTTPD_DEFAULT_CONFIG, overide settings

Postby mikemoy » Wed Sep 26, 2018 10:53 pm

Sorry for such a novice question. In http_server.h it has the following.

Code: Select all

#define HTTPD_DEFAULT_CONFIG() {                        \
        .task_priority      = tskIDLE_PRIORITY+5,       \
        .stack_size         = 4096,                     \
        .server_port        = 80,                       \
        .ctrl_port          = 32768,                    \
        .max_open_sockets   = 7,                        \
        .max_uri_handlers   = 8,                        \
        .max_resp_headers   = 8,                        \
        .backlog_conn       = 5,                        \
        .lru_purge_enable   = false,                    \
        .recv_wait_timeout  = 5,                        \
        .send_wait_timeout  = 5,                        \
};
in app_main() this is placed there.
static httpd_handle_t server = NULL;

My question is how can I change the value of "stack_size" ?

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: HTTPD_DEFAULT_CONFIG, overide settings

Postby mikemoy » Wed Jan 16, 2019 5:05 am

Like this.

httpd_config_t config = HTTPD_DEFAULT_CONFIG();

// Lets bump up the stack size (default was 4096)
config.stack_size = 8192;

httpd_start(&OTA_server, &config)

Who is online

Users browsing this forum: Bing [Bot] and 89 guests