mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
* Server Sent Events example - issue #7008 Illustrates the use of SSE using ESP8266WebServer * Update ServerSentEvents.ino * Create ServerSentEventsMultiClient.ino * sync * Update ServerSentEvents.ino * Update ServerSentEvents.ino Fix missing variables in printf statments Fix subscriptioncount not decreasing Fix SSEBroadcastState (argument sequence wrong) * Undo the library additions, move to current master * Fix compiler warning * Address review and fix multi-sensor updates Address points of @devyte's code review: * Use IPAddress vs. uint32_t * Refactor the URL parsing logic to use strlen vs. sizeof, since there was some confusion in the original (correct) version * Minimize copies of WiFiClients while in use * Use byref access for sensor updates Fix multi-sensor updates * Create an update Ticker for each sensor, because the original code only had one whose callback was overridden by sensorB, meaning sensorA never changed * Fix IPv6 build errors * Remove WiFiClient extraneous copy Avoid duplicating WiFiClient by using the WiFiClient object embedded in the subscriber[] array instead. Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>