Search found 153 matches

by Baldhead
Thu Aug 06, 2020 5:02 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Note: I can already send a message(same message) to all connected clients, but after the websocket are open(ie: finished websocket handshake i think). Hi. Can you do this asynchronously? I want to send a message to the ws-client from the main loop (int main ()), not from the ws-handler; and one ws-...
by Baldhead
Thu Aug 06, 2020 4:29 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi, I would like to know if it's possible set two uri's of type websocket inside "esp32 websocket server", but with a client using only a single socket to access both uri's. I tried to write a javascript test code inside the web browser, but opened 2 sockets(1 socket for each uri). I think because i...
by Baldhead
Wed Aug 05, 2020 4:30 pm
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

No one to help ???!!!!
by Baldhead
Wed Aug 05, 2020 7:59 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi again, I am try to send a message with the "server state" from websocket server in esp32 to a client at the moment when the client socket are open on server, but the socket are closed wih an error and i verify in Wireshark that the websocket handshake are not taken. I think that "websocket handsh...
by Baldhead
Tue Aug 04, 2020 1:05 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi, I am trying to implement a heart beat from a ping sent from the client to the websocket server. I would like to know the correct way to close a socket on the websocket server. In the below function( httpd_ws.c file ) are the "if(aux->ws_type == HTTPD_WS_TYPE_PING)". I'm still going to do the log...
by Baldhead
Mon Aug 03, 2020 12:16 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi, I am trying to implement a websocket server using the esp-idf component "esp_http_server". I can send and receive from my websockets clients messages of type HTTPD_WS_TYPE_TEXT, all works ok. When i try to send a reply with a ping frame from server to client using type "HTTPD_WS_TYPE_PING", the ...
by Baldhead
Tue Jul 28, 2020 9:16 pm
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

After send "Connection: close" in the http header from esp32 server to chrome client request, apparently solved the problem of several open sockets in server per client connection. Unfortunately it didn't solve the problem. Probably the best solution is to program a websocket client from scratch.
by Baldhead
Sun Jul 26, 2020 11:13 pm
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi, I would like to create a list of connected websocket sockets clients in esp32 server to be able to send "common messages" and "ping messages" to the all the clients. Although, from what i researched, i believe that websockets api in javascript in the browser does not support responding with pong...
by Baldhead
Sun Jul 26, 2020 10:48 pm
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi, After send "Connection: close" in the http header from esp32 server to chrome client request, apparently solved the problem of several open sockets in server per client connection. I put "Connection: close" in "html_download_get_handler" and "favicon_download_get_handler". Now the chrome client ...
by Baldhead
Fri Jul 24, 2020 3:37 am
Forum: ESP32 IDF
Topic: ESP32 Websocket Server
Replies: 24
Views: 3035

Re: ESP32 Websocket Server

Hi ESP_cermak, Thank's for the reply. I will do some comments in your text. Hi Baldhead, For asynchronous send from the ws server, you can use `httpd_queue_work()` as shown in the example with ws_async_send(). This is triggered as a response to some request (for testing purpose only), but could be u...

Go to advanced search