Web socket - Send asynchronous message from server to client without request from client
Posted: Wed Nov 17, 2021 8:23 am
Hi,
In the esp-idf included example ws_echo_server.c I cannot understand how the server can send a message to the client without the client sending a request previously. The function
requires the client to send a request first. Also, the function:
requires a existing request to be received so I cannot just send a packet.
Can somebody please clear this up please.
Regards,
Luke
In the esp-idf included example ws_echo_server.c I cannot understand how the server can send a message to the client without the client sending a request previously. The function
Code: Select all
trigger_async_send(httpd_handle_t handle, httpd_req_t *req)
Code: Select all
httpd_ws_send_frame(httpd_req_t *req, httpd_ws_frame_t *pkt)
Can somebody please clear this up please.
Regards,
Luke