mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-20 16:46:14 +00:00
http_server: adds WebSocket support
This commit adds the WebSocket support for esp_http_server library. It mainly does: - Handling WebSocket handshake - Parsing HTTP upgrade request - Reply the upgrade request - Receive WebSocket packets - Parse header, decode to a struct - Unmask payload (if required) - Send WebSocket frames - Receive WebSocket frame - Automatic control frame handling Merges https://github.com/espressif/esp-idf/pull/4306 Closes https://github.com/espressif/esp-idf/issues/4819
This commit is contained in:
@@ -281,7 +281,9 @@ bool httpd_sess_pending(struct httpd_data *hd, int fd)
|
||||
if (sd->pending_fn) {
|
||||
// test if there's any data to be read (besides read() function, which is handled by select() in the main httpd loop)
|
||||
// this should check e.g. for the SSL data buffer
|
||||
if (sd->pending_fn(hd, fd) > 0) return true;
|
||||
if (sd->pending_fn(hd, fd) > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return (sd->pending_len != 0);
|
||||
|
Reference in New Issue
Block a user