ESP32 Persistent Server/Client communication
Posted: Sun Jun 25, 2023 10:52 am
Hi,
I'm in the process of creating a Server(ESP) Client(Webapp hosted in the VFS), and I would like that the client receives in the occurence of an event in the server side new data. With HTTP communication that is not reachable since the client should first send a request to get the response through the Handler. Hence thinking of Websockets, but that also seems to be implemented based on HTTP meaning that first the websocket should receive a message from the client to react to it and send to response.
How can I achieve a one-way communication where the ESP is always a sender (permanently) and the client is only a listener where it doesn't have to send any request to get the answer?
Thanks in advance.
I'm in the process of creating a Server(ESP) Client(Webapp hosted in the VFS), and I would like that the client receives in the occurence of an event in the server side new data. With HTTP communication that is not reachable since the client should first send a request to get the response through the Handler. Hence thinking of Websockets, but that also seems to be implemented based on HTTP meaning that first the websocket should receive a message from the client to react to it and send to response.
How can I achieve a one-way communication where the ESP is always a sender (permanently) and the client is only a listener where it doesn't have to send any request to get the answer?
Thanks in advance.