ApiServer: add AsyncWebSocket at /ws; accept JSON {event, payload} (string or object) and dispatch via ctx.fire; mirror all local events to clients using NodeContext::onAny.\nNodeContext: add onAny subscriber API.\nNeoPatternService: add api/neopattern/color event to set solid color.\nCluster: centralize cluster/broadcast sending in core; services delegate.\nAPI: add generic /api/node/event and /api/cluster/event endpoints in respective services.\nTests: add ws-color-client, ws-cluster-broadcast-color, http-cluster-broadcast-color.\nDocs: add StreamingAPI.md; update README and test/README.\nFixes: robust WS JSON parsing on ESP8266 and payload handling.
9 lines
176 B
JavaScript
9 lines
176 B
JavaScript
'use strict';
|
|
|
|
module.exports = function () {
|
|
throw new Error(
|
|
'ws does not work in the browser. Browser clients must use the native ' +
|
|
'WebSocket object'
|
|
);
|
|
};
|