Skip to main content

socket

Browser Only

This can only be used in code which runs in Dashboards and Graphics.

socket

Provides a reference to the Socket.IO client socket instances.

See the Socket.IO docs for full usage details.

Example

Listening for socket disconnect events:

nodecg.socket.on("disconnect", () => {
console.log("Socket disconnected!");
});