...
Example Template
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_CHAR AppHTTPc_ReqBodyBuf[1024]; static CPU_BOOLEAN HTTPc_ReqBodyHook (HTTPc_CONN_OBJ *p_conn, HTTPc_REQ_OBJ *p_req, void **p_data, CPU_CHAR *p_buf, CPU_INT16U buf_len, CPU_INT16U *p_data_len) { CPU_SIZE_T data_len; data_len = App_ReadDataStream(&AppHTTPc_ReqBodyBuf); /* Theoretical application's function to read a stream of data and ... */ /* ... copy it in the buffer and return the length of data copied. */ *p_data = &AppHTTPc_ReqBodyBuf; *p_data_len = data_len; if (data_len == 0) { return (DEF_YES); } else { return (DEF_NO); } } |
...