From e5650d1ed8b20ec65fec3d3ac0809479632ab0fc Mon Sep 17 00:00:00 2001 From: David Cermak Date: Thu, 5 Mar 2020 16:26:26 +0100 Subject: [PATCH] examples: websocket example to send textual data with esp_websocket_client_send_text() Closes https://github.com/espressif/esp-idf/issues/4640 --- examples/protocols/websocket/main/websocket_example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/protocols/websocket/main/websocket_example.c b/examples/protocols/websocket/main/websocket_example.c index 57381ebf2..e424066d2 100644 --- a/examples/protocols/websocket/main/websocket_example.c +++ b/examples/protocols/websocket/main/websocket_example.c @@ -115,7 +115,7 @@ static void websocket_app_start(void) if (esp_websocket_client_is_connected(client)) { int len = sprintf(data, "hello %04d", i++); ESP_LOGI(TAG, "Sending %s", data); - esp_websocket_client_send(client, data, len, portMAX_DELAY); + esp_websocket_client_send_text(client, data, len, portMAX_DELAY); } vTaskDelay(1000 / portTICK_RATE_MS); }