Methods
Web Sockets
Dashboard has the Socket.io system loaded into it.
Access
const SocketIO = Dashboard.io;
Important: Socket.io is only available after using the Dashboard.init()
method.
Usage
const test = SocketIO.of("/test");
test.on("connection", () => {
console.log("ModuleExample socket.io connected.");
});
Web Socket is now accesible from the ws://domain.com/test
if the SSL is not used with the Dashboard or wss://domain.com/test
if it is.
Was this page helpful?