Brendan Abolivier 10 lat temu
rodzic
commit
99397f16cd
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2
    2
      web/js/multi.js

+ 2
- 2
web/js/multi.js Wyświetl plik

17
 function init() {
17
 function init() {
18
 
18
 
19
     var hostname = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:/)[1];
19
     var hostname = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:/)[1];
20
-    var hostname = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:(.+)\//)[1];
20
+    var port = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:(.+)\//)[2];
21
 
21
 
22
     // Connexion à socket.io
22
     // Connexion à socket.io
23
-    socket = io.connect('http://'+hostname+':8000');
23
+    socket = io.connect('http://'+hostname+':'+port);
24
 
24
 
25
     // Gestion des evenements
25
     // Gestion des evenements
26
     setEventHandlers();
26
     setEventHandlers();