浏览代码

Bugfixing

Brendan Abolivier 10 年前
父节点
当前提交
99397f16cd
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      web/js/multi.js

+ 2
- 2
web/js/multi.js 查看文件

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();