Make Websocket connect depend on where the client got the HTML

MAX31855-EH
chrono 2013-11-23 23:45:58 +01:00
rodzic 64aa596a56
commit 0d7edffca8
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -176,9 +176,10 @@ function updateProgress(percentage){
$('#progressBar').html(percentage+'%');
}
var host = "ws://" + window.location.hostname + ":8080";
var s = new WebSocket("ws://localhost:8080/status");
var c = new WebSocket("ws://localhost:8080/control");
var s = new WebSocket(host+"/status");
var c = new WebSocket(host+"/control");
c.onmessage = function(e)