File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -129,10 +129,15 @@ namespace WebSocket
129129 m_socket.loop ();
130130 }
131131
132+ void broadcastMessage (String msg)
133+ {
134+ WebSocket::m_socket.broadcastTXT (msg.c_str ());
135+ }
136+
132137 void broadcastStatus ()
133138 {
134139 String msg = " {\" status\" : " + String ((int )FastLEDHub.getStatus ()) + " , \" currentAnimation\" : \" " + FastLEDHub.getCurrentAnimationName () + " \" }" ;
135- WebSocket::m_socket. broadcastTXT (msg. c_str () );
140+ broadcastMessage (msg);
136141 }
137142
138143} // namespace WebSocket
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ namespace WebSocket
1212 // / Handle websocket
1313 void handle ();
1414
15+ // / Broadcast a message to all active websocket connections
16+ void broadcastMessage (String msg);
17+
1518 // / Broadcast the current animation status to all active websocket connections
1619 void broadcastStatus ();
1720
You can’t perform that action at this time.
0 commit comments