From 6e53fd0dfd830d6d96206419c530c71fa4b3f4e6 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Thu, 21 Oct 2021 19:28:20 +0200 Subject: :sparkles: Add attempt at the "simulation" --- src/SocketIO/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/SocketIO') diff --git a/src/SocketIO/index.js b/src/SocketIO/index.js index da140bb..88b5459 100644 --- a/src/SocketIO/index.js +++ b/src/SocketIO/index.js @@ -310,6 +310,11 @@ function createAuthorizedNamespace(io) { logger.info("Stopped debugger"); }); + /* Matrix and strip buffer */ + socket.on("matrix:get", () => { + socket.emit("matrix", neoModules.neoRuntimeManager.matrix); + }); + socket.on("disconnect", () => { logger.access(`SOCKET:authed Client (${socket.id}@${socket.handshake.headers.host}) disconnected.`); if (debuggerOpen) { @@ -319,6 +324,12 @@ function createAuthorizedNamespace(io) { }); }); + neoModules.neoRuntimeManager.event.on("matrix", (matrix) => { + authorizedNamespace.emit("matrix", matrix); + }); + neoModules.neoRuntimeManager.event.on("strip_buffer", (strip_buffer) => { + authorizedNamespace.emit("strip_buffer", strip_buffer); + }); neoModules.selfUpdater.updater.event.on("step", (step) => { authorizedNamespace.emit("updater:step", step); }); -- cgit v1.2.3