Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ioxy/web/assets/js/ws.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// Variables
let socket = new WebSocket("ws://" + window.location.host + "/ws");
function wsURI() {
if (window.location.protocol == "https:") {
return "wss://" + window.location.host + "/ws";
}
return "ws://" + window.location.host + "/ws";
}

let socket = new WebSocket(wsURI());
socket.onopen = function (e) {
appendInConsole("Connection with MOXY established");
};
Expand Down