/** * Node Signal Exchanger test client * * @author Pierre HUBERT */ const Config = { port: 8081, server_name: "localhost", clientID: location.href.toString().includes("#1") ? "client-1" : "client-2" }; let client = new SignalExchangerClient( Config.server_name, Config.port, Config.clientID ); client.onConnected = function(){ console.log("Connected to signal exchanger server."); } client.onError = function() { console.error("An error occurred with the connection to the signal exchanger server"); } client.onClosed = function() { console.log("Connection to server closed."); }