You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task: ESP32, Websocket-Client, receive and process 48,000 Bytes of Data
The library could not handle such long messages.
Workaround:
Server splits the data into four pieces.
Client collects the 4 portions
Issue
After code line with "SEND_3" the message will be corrupted.
It seems that "readBlocking()" does not free the message buffer.
Workaround:
client.connect() .. message 1 .. client.close()
client.connect() .. message 2 .. client.close()
client.connect() .. message 3 .. client.close()
client.connect() .. message 4 .. client.close()
Any suggestions for a cleverer solution?
*/
client.connect(server_address);
if (client.available())
{
client.send("SEND_1"); // Server will send first 12,000 Bytes
auto message = client.readBlocking();
// do something with the message
client.send("SEND_2"); // Server will send second 12,000 Bytes
auto message = client.readBlocking();
// do something with the message
client.send("SEND_3"); // Server will send third 12,000 Bytes
auto message = client.readBlocking();
// do something with the message
client.send("SEND_4"); // Server will last 12,000 Bytes
auto message = client.readBlocking();
// do something with the message
}
The text was updated successfully, but these errors were encountered:
/*
Task: ESP32, Websocket-Client, receive and process 48,000 Bytes of Data
The library could not handle such long messages.
Workaround:
Issue
After code line with "SEND_3" the message will be corrupted.
It seems that "readBlocking()" does not free the message buffer.
Workaround:
Any suggestions for a cleverer solution?
*/
client.connect(server_address);
if (client.available())
{
client.send("SEND_1"); // Server will send first 12,000 Bytes
auto message = client.readBlocking();
// do something with the message
}
The text was updated successfully, but these errors were encountered: