The following symbols can be defined to change the configuration
| Name | Description | Default |
|---|---|---|
| CONFIG_ASYNC_TCP_RUNNING_CORE | The CPU core to run the async task on | -1 (any cpu) |
| CONFIG_ASYNC_TCP_USE_WDT | If the watchdog timer should be enabled while processing TCP messages. Set to 0 to disable | 1 (enabled) |
| CONFIG_ASYNC_TCP_TASK_STACK_SIZE | The number of 32-bit words (not bytes!) to allocate for use as the task's stack. | 8192 |
| CONFIG_ASYNC_TCP_TASK_PRIORITY | The priority at which the created task will execute. | 3 |
| CONFIG_ASYNC_TCP_DIAGNOSTICS | Enable diagnostic functions | disabled |
| Name | Description | Default |
|---|---|---|
| CONFIG_LWIP_MAX_ACTIVE_TCP | https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-lwip-max-active-tcp | 16 |
AsyncTCP creates a task to handle the TCP messages. This task needs to be initialize with stack space. See How big should the stack be?
This function gets the async_tcp task's minimum amount of remaining stack space that was available to the task since the task started executing - - that is the amount of stack that remained unused when the task stack was at its greatest (deepest) value. This is what is referred to as the stack 'high water mark'. For more information on the stack high water mark, see See https://www.freertos.org/uxTaskGetStackHighWaterMark.html
If the value from this function is close to zero, increasing CONFIG_ASYNC_TCP_TASK_STACK_SIZE can help.
static UBaseType_t AsyncClient::getStackHighWaterMark()There is a potential race between AsyncClient::space() and an incoming error event, where the LwIP task might free the tcp_pcb while a client task is accessing it. We are (currently) accepting this risk as the cost of synchronizing across the tcp_pcb access is very large compared to the lookup cost, and error events are very infrequent in normal operation.
This is a fully asynchronous TCP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP32 MCUs.
This library is the base for ESPAsyncWebServer
The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.