esp_http_server: support dynamic payload len for ws server

Closes https://github.com/espressif/esp-idf/issues/6433
This commit is contained in:
yuanjm
2021-02-02 15:00:01 +08:00
committed by bot
parent 56ca89f0f5
commit cd521d4ae3
7 changed files with 131 additions and 56 deletions

View File

@@ -1591,6 +1591,11 @@ typedef struct httpd_ws_frame {
/**
* @brief Receive and parse a WebSocket frame
*
* @note Calling httpd_ws_recv_frame() with max_len as 0 will give actual frame size in pkt->len.
* The user can dynamically allocate space for pkt->payload as per this length and call httpd_ws_recv_frame() again to get the actual data.
* Please refer to the corresponding example for usage.
*
* @param[in] req Current request
* @param[out] pkt WebSocket packet
* @param[in] max_len Maximum length for receive