Skip to content

Commit 652276d

Browse files
committed
Update WS example to also send a message in the message queue when we get one
1 parent 93ce6e7 commit 652276d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

examples/WebSocket/WebSocket.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ void setup() {
118118
if (info->message_opcode == WS_TEXT) {
119119
Serial.printf("ws text: %s\n", (char *)data);
120120
client->ping();
121+
// Also send a message in the message queue when we get one
122+
ws.textAll("Message received: " + String((char *)data));
121123
}
122124

123125
} else {

0 commit comments

Comments
 (0)