uIP applications can store the application state within the uip_conn structure by specifying the size of the application structure with the UIP_APPSTATE_SIZE macro.
The file containing the definitions must be included in the uipopt.h file.
The following example illustrates how this can look.
void httpd_appcall(void); #define UIP_APPCALL httpd_appcall struct httpd_state { u8_t state; u16_t count; char *dataptr; char *script; }; #define UIP_APPSTATE_SIZE (sizeof(struct httpd_state))
Defines | |
#define | UIP_APPCALL smtp_appcall |
The name of the application function that uIP should call in response to TCP/IP events. | |
#define | UIP_APPSTATE_SIZE (sizeof(struct smtp_state)) |
The size of the application state that is to be stored in the uip_conn structure. |