if (!this.firstConnection) {
this.firstConnection = server;
} else {
if (this.firstConnection.readyState === WebSocket.OPEN) {
this.firstConnection.send(
JSON.stringify({ Event: "sync", Command: "" })
);
console.log("Event 'sync' send to the first Connection");
}
}
if (!this.firstConnection) {
this.firstConnection = server;
} else {
if (this.firstConnection.readyState === WebSocket.OPEN) {
this.firstConnection.send(
JSON.stringify({ Event: "sync", Command: "" })
);
console.log("Event 'sync' send to the first Connection");
}
}