Task Configuration
HTTP_TASK_CFG
µC/HTTP-sever has a separated structure for the task configuration of the HTTP server Instance. The structure defines the task priority, the stack size and the stack memory location. Like the HTTPs_CFG
object, the HTTP_TASK_CFG
object must be passed to the HTTPs_InstanceInit API function during the initialization of the HTTP server instance.
Structure Fields
const HTTP_TASK_CFG HTTPs_TaskCfgInstance = { HTTPs_OS_CFG_INSTANCE_TASK_PRIO, /* .Prio */ HTTPs_OS_CFG_INSTANCE_TASK_STK_SIZE, /* .StkSizeBytes */ DEF_NULL, /* .StkPtr */ };
Configuration Fields Description
Structure Field | Type | Description | Possible Values |
---|---|---|---|
Prio | CPU_INT32U | Configure Instance Task priority. We recommend to configure the Network Protocol Stack task priorities & HTTP server Instances tasks priorities as follows:
We recommend that the uC/TCP-IP Timer task and network interface Receive task be lower priority than almost all other application tasks; but we recommend that the network interface Transmit De-allocation task be higher priority than all application tasks that use uC/TCP-IP network services. However better performance can be observed when the web server instance is set with the lowest priority. So some experimentation could be required to identify the better task priority configuration. | SHOULD be >= than the minimum priority number allowed by the OS. |
StkSizeBytes | CPU_INT32U | Configure HTTP server instance task stack size. | SHOULD be >= than the minimum stack size allowed by the OS. |
StkPtr | void* | Pointer to base of the stack. When the Stack pointer is defined as null pointer (DEF_NULL), the task's stack should be automatically allowed on the heap of uC/LIB. | SHOULD be a Memory pointer |