Anul 3 Semestrul 1

This commit is contained in:
2025-02-06 20:33:26 +02:00
parent 0b130ee18c
commit 184f3bd92e
313 changed files with 348499 additions and 0 deletions
@@ -0,0 +1,23 @@
const ReconnectingWebSocket = require("reconnecting-websocket");
const WS = require("ws");
const ws = new ReconnectingWebSocket(`ws://${"192.168.0.45"}:${"8080"}`, [], {
WebSocket: WS.WebSocket,
connectionTimeout: 1000,
startClosed: true
});
ws.onopen = () => {
console.log("Connected to server.");
}
ws.onmessage = data => {
const message = JSON.parse(data);
console.log("Received message:", message);
}
while (true) { }